Hello,
I am trying to write a macros to select a range of cells and then sort alphabetically in ascending order using information found in another range. For my example below the larger range is called "Team Ambrosio" and within that range is another range called "CSR_Ambrosio". I am trying to write a macros that will sort the larger range (Team_Ambrosio) in ascending order based on the text values of the smaller range (SCR_Ambrosio).
I tried recording a macros and then substituting the cell ranges with the names of the cell ranges. I then replaced the Worksheet name using "ActiveSheet" because I need the macros to run on whatever sheet is active at the time. This may be where my problem is, I'm not sure. But I do not want to use the "Worksheet Name" because the name will be changing every time I create a new worksheet.
I receive the following error: 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. The debugger takes me to the ".Apply" line below. Any help would be appreciated on how to get this to function correctly. Thanks!
![]()
Please Login or Register to view this content.
Bookmarks