Diane Lonergan
asked on
Excel vba to manipulate data
Please see attached sample. Using sheet1 as the source, I would like a piece of vba to move each row to an output sheet. For each row it would check cell R to see if the series number had changed. When it detects that it has changed it will need to position back to the rows preceding the change in column R value and overwrite cell A for all rows that have the same value in cell R with the very last value of cell A that it finds in the series. Probably easier to understand when looking at the sample output.
Each entire row including the header row should be copied to the output sheet. There will be 1000's of rows in my real data.
sample-docseries.xlsx
Each entire row including the header row should be copied to the output sheet. There will be 1000's of rows in my real data.
sample-docseries.xlsx
Will it always be in order on Column R?
ASKER
Thanks Guys for your questions. In reply....
It should be sorted by column, but just in case it would be safer to have a sort on this column at the start of the script.
Regarding data change, this is a migration I'm doing all iterations so it would be manually run and the vba would be run by me on demand
It should be sorted by column, but just in case it would be safer to have a sort on this column at the start of the script.
Regarding data change, this is a migration I'm doing all iterations so it would be manually run and the vba would be run by me on demand
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Superb, Thank You JP.
ASKER
Thanks for help. Really appriciated
This is not difficult, I've posted many such examples.
How would the code know it has changed? I would normally just run the code to overwrite the existing data on the separate sheets