Hello!
I get some workbooks on a weekly basis from a supplier. The data is split across 4/5 worksheets and I pick up certain data from the last worksheet (anything that has a 0 as the 1st charachter in the string in column B) and add it to the prior sheet under the last cell in column B with a 0 as the 1st letter. I then repeat until all data is on the 1st sheet. I was wondering if anyone would be able to help me build it please?
I'm thinking I'll need to loop through the sheets in the workbook, use a for loop on each sheet with an if statement nested inside to test for the 1st charachter being 0. Something like this:
For Each Sheets In Workbook
For j = 2 To 50
If Left(Cells(j, 2), 1) = 0 Then Rows(j).Copy _
Next cell
Next Sheet
I think the bit I'm going to find most difficult is pasting to the prior sheet under the last cell with a 0 in it (there is text information in the cells above and below that data but I'm happy for that to be overwritten).
Thanks (and apologies, I'm very early in my macros studies!)
I get some workbooks on a weekly basis from a supplier. The data is split across 4/5 worksheets and I pick up certain data from the last worksheet (anything that has a 0 as the 1st charachter in the string in column B) and add it to the prior sheet under the last cell in column B with a 0 as the 1st letter. I then repeat until all data is on the 1st sheet. I was wondering if anyone would be able to help me build it please?
I'm thinking I'll need to loop through the sheets in the workbook, use a for loop on each sheet with an if statement nested inside to test for the 1st charachter being 0. Something like this:
For Each Sheets In Workbook
For j = 2 To 50
If Left(Cells(j, 2), 1) = 0 Then Rows(j).Copy _
Next cell
Next Sheet
I think the bit I'm going to find most difficult is pasting to the prior sheet under the last cell with a 0 in it (there is text information in the cells above and below that data but I'm happy for that to be overwritten).
Thanks (and apologies, I'm very early in my macros studies!)