I have downloaded data which must be transferred onto a form (as shown on "template" tab) in a very specific way.
I have color coded the fields from the data tab to cells on the template tab, indicating where the data needs to be copied to, and I have indicated the cell reference above each column heading on the data tab as to where it belongs on the templates. The template tab is simply there for reference. I have created 5 tabs so far in this example, from rows 11-17 of the data. The macro will need to create new tabs along the way, with the template layout. The color coding should not be kept when creating new tabs. Each row on the data tab will result in two rows of data on the tabs created by the template. Those two rows will be rows 14 & 15, or below, if there is more than one row of data being copied to the same tab. Each row on the data tab must be entered onto it's own tab, with the following exception:
After entering data from a row on the data tab to a tab created by the template tab, you may continue using the same tab for the next row of data IF: both "name" (column A on data tab) AND "Pay End Date" (column D on data tab) are equal, from the row you just copied over and the next row, those two rows of data can go on the same tab. For example, on the data tab, name and pay end date are equal in rows 11 and 12. Those may go on the same tab. However, when comparing rows 12 and 13, even though name is the same, because pay end date isn't the same, that row of data must go on it's own tab.
Every new tab will have data in rows 14 & 15. Row 15 will be copied from the data tab. Row 14 will be referencing the row below but be negative.
I created the first 5 tabs as an example for data in rows 11-17 of the data tab. There could be a few hundred lines of data and that is why I want to write a macro to do this.
Tabs should be named with their pay end date and name initials, if possible. If this is too difficult, then sheet1, sheet2 or anything else is fine.
Any help would be greatly appreciated.
Bookmarks