Hi
I have this Excel file (please see below, with my attempt included).
What is not highlighted is the input data and what is highlighted in green is the expected output, but I am not getting it right. This is just a prototype, an example, as in the main actual files I have a dozen of such entries.
Basically I have to make sure that it inserts new rows below the first row of each section. By section I mean the zone on column A that corresponds to the same Car Name.
The condition would be to insert rows below the 1st one of each section, copy the one above it and change just columns B and C, as the year and months should decrease until they reach the start date, as it can be seen in the picture below (please note that the "so on", was used to explain how the trend should be until it reaches the last row that should be inserted by VBA).
This has to be done for multiple car names, so I tried doing it with a for loop but I got stuck.
To sum it up, the condition is that it has to be within the same section (car name) then below the 1st row to insert within the section to insert multiple rows by copying the one above it and change just columns B and C (year, respectively the month) until the end date = start date on the last added row, then stop adding rows on the specific section and move on to the next one.
Any support would be greatly appreciated!
Gordon
Bookmarks