I have a tab with four different sets of similar data. Each pasted from a pivot table with a different item in filter selected. I need to sort each column desc, which is why i can't leave it in the pivot. I have four sets of similar code, only the starting point of the data sets changes. When running the macro, the first data set sorts perfectly. But when i get to the apply step in the second set of code, it tells me "Run time error 1004- The sort reference is not valid. Make sure that it's within the data you want to sort, and the first Sort By Box isn't the same or blank."
Below are the first two sets of code
I can’t for the life of me figure out why I’m getting that error. I threw in those test-test4 variables to help me, but as far as i can tell the outputs are what they should be. IE test matches test3 and test2 matches test4. The ending rows and starting columns are different, but looking at the data they match.Please Login or Register to view this content.
Capture.PNG
Any assistance would be appreciated.
Bookmarks