I'm currently using a macro, which runs whenever there's ANY change on my worksheet, which basically hides/unhides rows where there is data or no data. This macro itself is working the way I want it to. However, in addition to the current function, I'd like it to sort on a specific column on the pivot. For example, on D15 (no range since the it will vary). But I don't want it to get on a loop or vicious cycle, where it's sorting and then performing the remaining portion of the macro, in which case, it will crash Excel:
I'm trying to use something like this, but can't seem to get it to work:
I can't seem to use FieldName because the FieldName contains multiple fields that are labeled the same. For example: Year is the column Field, but it's showing multiple years in separate columns, but they are all labeled as Year. I don't know how to distinguish between the years.
Any help is appreciated.
Bookmarks