Hi All,
I have attached a sample file (CSV) as below (Type A.csv).
In this particular file we have 4 columns:
State fieldA fieldB Numberfield
There is a strict order in which the values for each column as you move down. And also the fields are ordered in a specific way.
There can be a number of states for each CSV, in this example there are 2 states, called 1 and 2.
Next is the fieldA. For each state the fieldA values range from 7947 to 8034.
For each state and fieldA, there is a fieldB value which ranges from 0 to 130.
There is also a numberfield attached to each row item which is as shown in column D.
What I would like to do is: to insert for each state, after the last fieldB value i.e. 8034, 6 more fieldA values i.e. for state 1 after row 11529 in the attached spreadsheet, I would like to add in state1 fieldA 8035, fieldB 0-130, and for numberfield I would like to take a direct copy of the number fields for the previous 130 rows (e.g. using an autofill of the previous 130 rows).
I would thus like to add in 6 more fieldA values for each state (1 and 2) thus addining in fieldA from 8035 to 8040 and cycling through the other fields.
The macro should be designed to pick up as many states as there are in columnA and extend each accordingly based on the rules described above.
Could anyone please help with this - doing it manually is quite tedious?
thanks and regards,