I have a Table, called "Table2" on "Sheet1". I also have a PivotTable, called "PivotTable2" on "Pivot" tab.
Headers that will be important in Table2 are "Location" and "IDNum" and "Service" and "Size".
I'm trying to write some VBA that does this:
1. Filters "Service" column for values of "CS", "DS", "LR", "M", "R", "RC". Sometimes all of these will be present, sometimes only some of them, so it shouldn't error out if it doesn't find some of these values, should just move on to looking for the next value.
2. In the "Size" column for only these filtered rows, Vlookup the concatenation of the corresponding values on same row in "Location"-"IDNum" against "PivotTable2" with the TableArray being columns "Y:AB" on the "Pivot" tab, returning the 4th column,"AB".
3. Paste these Vlookups as Values.
I feel like this should be easy enough, but I can't quite get it with the Macro recorder. Any ideas?
Thanks!
Headers that will be important in Table2 are "Location" and "IDNum" and "Service" and "Size".
I'm trying to write some VBA that does this:
1. Filters "Service" column for values of "CS", "DS", "LR", "M", "R", "RC". Sometimes all of these will be present, sometimes only some of them, so it shouldn't error out if it doesn't find some of these values, should just move on to looking for the next value.
2. In the "Size" column for only these filtered rows, Vlookup the concatenation of the corresponding values on same row in "Location"-"IDNum" against "PivotTable2" with the TableArray being columns "Y:AB" on the "Pivot" tab, returning the 4th column,"AB".
3. Paste these Vlookups as Values.
I feel like this should be easy enough, but I can't quite get it with the Macro recorder. Any ideas?
Thanks!