Taxacctintern
New Member
- Joined
- Jul 3, 2009
- Messages
- 6
I have a file that weekly I download from an internal program and copy to an excel spreadsheet. The file tracks sales/items for sale. I then have to sort the items by 4 different criteria with an inserted space between the different sections. The first two sorts are done using these formulas (VLOOKUP(A3, 'Special price'!$A$2:$B$21, 2, FALSE)
VLOOKUP(A24, 'Special price'!$A$22:$B$91, 2, FALSE). The remaining two sorts are done using two of the columns. So what is included in the first sort of is anything from the current 19662 items that matches the first formula which I paste to all items then sort sm to large, then I add a spacer line, then run second for remaining items, sort sm to lg, then sort by the two columns. So, my question is, I can run the macro to perform how I need it to for the given weeks info, but say I download next week and there are 19672 items instead, the macro doesn't adjust to include those items. I have manually tried to add those lines in VBA but it usually ends up in error. Any ideas or do I just have to run sm macors to accomplish what I need to?
VLOOKUP(A24, 'Special price'!$A$22:$B$91, 2, FALSE). The remaining two sorts are done using two of the columns. So what is included in the first sort of is anything from the current 19662 items that matches the first formula which I paste to all items then sort sm to large, then I add a spacer line, then run second for remaining items, sort sm to lg, then sort by the two columns. So, my question is, I can run the macro to perform how I need it to for the given weeks info, but say I download next week and there are 19672 items instead, the macro doesn't adjust to include those items. I have manually tried to add those lines in VBA but it usually ends up in error. Any ideas or do I just have to run sm macors to accomplish what I need to?