Hello,
I have 2 Sheets:
In the "accounts" sheet in col B I have a unique account number or numbers
In the "data" sheet I have 7 columns (with account numer in col C) . It can be up to 5k rows in this sheet.
For each account from "accounts" sheet I have to look up a matching number of accounts in "data" sheet and copy found rows under a given account row from "accounts" sheet. It can be ca. 100-120 unique accounts in "accounts" sheet (The number of sheets may change but not much from time to time and will be inserted manually).
Then, for each account in "accounts" sheet I have to insert subtotals and grouping.
I have done that with "for... next" implemented many times. For sure to many and takes ages to process.
I'll gratefull if anybody could suggested me a solution with the use of arrays (if this is the best solution),
I enclose a file with a simple macro.
Many thanks,
s.
I have 2 Sheets:
In the "accounts" sheet in col B I have a unique account number or numbers
In the "data" sheet I have 7 columns (with account numer in col C) . It can be up to 5k rows in this sheet.
For each account from "accounts" sheet I have to look up a matching number of accounts in "data" sheet and copy found rows under a given account row from "accounts" sheet. It can be ca. 100-120 unique accounts in "accounts" sheet (The number of sheets may change but not much from time to time and will be inserted manually).
Then, for each account in "accounts" sheet I have to insert subtotals and grouping.
I have done that with "for... next" implemented many times. For sure to many and takes ages to process.
I'll gratefull if anybody could suggested me a solution with the use of arrays (if this is the best solution),
I enclose a file with a simple macro.
Many thanks,
s.