Hello Gurus,
This is a problem I've come across several times in the past but I've never been able to solve (always found a work around somehow) but I'm throwing in the towel and asking for help this time.
How can I create a macro that will take in all records where a given condition is met. For example, given this data set:
| Company | Sale |
| ACME | 156 |
| Company & Co | 678 |
| ACME | 78 |
| ACME | 1865 |
| Company & Co | 235 |
How can my macro:
- Take in all records where [Company] == "ACME"
- Perform calculations X, Y, and Z
- Create a file containing ONLY [Company] data (This part I know how to do)
- THEN, take in all records where Company == "Company & Co"
- Repeat steps 2 & 3
- Continue for each unique [Company] name in the table
So essentially, loop over an undetermined number of [Company] names, and perform calculations X, Y, Z for each