Hi All,
I've been re-searching my issue for hours now and still nothing that can really help me. I'm not a programmer but can get by with a bit of VB.
My issue -
I am trying to insert rows based on a count of values in cells. This will allow me to fill down data (copy same text) to essentially transpose the fields.
The example below is what i want to insert rows below for each model.
MODEL SP Code SP Code SP Code SP Code SP Code Count
MODEL4 artfacq1 artfacq2 artfacq3 artfacq4 4
MODEL23 artfacq6 artfacq7 artfacq8 artfacq8 artfacq9 5
MODEL21 artfacq11 artfacq12 artfacq13 3
The finished output would look like below
MODEL SP Code SP Code SP Code SP Code SP Code Count
MODEL4 artfacq1
MODEL4 artfacq2
MODEL4 artfacq3
MODEL23 artfacq4
MODEL23 artfacq6
MODEL23 artfacq7
MODEL23 artfacq8
MODEL23 artfacq8
MODEL21 artfacq9
MODEL21 artfacq11
MODEL21 artfacq12
MODEL21 artfacq13
I found some VB code to insert the row based on value and have added into my excel file. This works (kinda) but i can't figure the rest out as it's too complicated for my vb expertise.
Sub Test()
For N = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(N, 7) <> "" And Cells(N, 7) <> 1 Then
Rows(N + 1 & ":" & N + Cells(N, 7) - 1).Insert
End If
Next N
End Sub
Please see my attached excel sheet and let me know if this is even possible.
Thanks :D
Bookmarks