Originally Posted by
Leith Ross
Hello Pierce Quality,
Okay, I think this should work for you. The macro will create a log file, in the same directory as the workbook, that contains the last row on the worksheet "BeforeData" whenever the users does a Save or SaveAs. The range to be sorted is defined from the old last row + 1 to the current last row. The data is sorted first by Date then by Area.
Hello Leith,
I'm afraid that direction wont quite work for our situation with contiginous data, but is very close. In speaking with some of the users, we wont need to last row data to be saved anymore and we are going to run it as a macro instead of a before save event on a single book to pilot the change.
Here's what I ended up coming up with:
This seems to work well for a basic application so far, I also set the end selection to be on the first open cell in column A after the data, (you would need to add a header in A1 in the example book for this to work).
Do you have any insights on how I could make this code better? Eventually this will be sorting tens of thousands of rows of data so I would like to work out the kinks as early as I can.
Thanks!
Bookmarks