I am looking to write a macro that will find 2 cell values and then make the number of rows in between those 2 cell values uniform throughout a worksheet.
Example:
I have attached a sample worksheet
All the data is in column A
I need to find a cell value 'Group1' , then find a second cell value 'Group2' and then count the rows in between the two. If the result is 15, then all is good. If there are less than 15 rows between the 2 I need to add however many rows to make it 15.
I need the macro to loop through the worksheet to check that there are 15 rows between Group2 and Group3 and 15 rows between Group3 and Group4 etc.
I am guessing that the same thing could be achieved using 'do until' however I do not know how that will work..... with my limited VBA knowledge.
I need each 'group' to be a specific size because I will be adding in columns after I make each 'group' the same size.
I realise that it is relatively straight forward to merge 2 workbooks, however, I cannot merge my 2 workbooks...as you can see from the example worksheet, the data in the rows that follow each 'Group' is the same for each group, but there is nothing to match with the data that I need to append.
The number of Groups is variable (from 1 to 150), but they always run sequentially down Column A.
Any help appreciated.
Bookmarks