I have excel sheet with name of Clients in Column B starting from cell B2 and goes on until B300
I want to insert 2 rows in between each client and name those cell as A & B and format it to the right of the cell.
Example as below:
Cell B2 : John Doe
B3 : Alen Smith
B4 : Wes Barb
change above to :
B2 : John Doe
B3 : A
B4 : B
B5 : Alen Smith
B6 : A
B7 : B
B8 : Wes Barb
B9 : A
B10: B
and so on..
Please let me know if any questions.
If this is a one-time thing, you can just insert a column before B, number each name in sequence. Then create a similar numbered list with A's and a list with B's, then sort the entire list by sequence.
Again, if this is a one-time thing, the method described above will work. If you need to do this repeatedly, do you need to retain formatting or formulas on the existing rows? Are there any criteria for including/excluding rows (totals, subtotals)?
I think you are misunderstanding me.
Please refer to attached excel sheet as example.
This is showing just few customers in sheet1...overall i have over 350 customers.
Sheet2 is what i need to achive for all customers.
Please let me know if any questions.
Thanks a lot for helping.
Riz
I have added a button to "Sheet2" to run the macro below. This will copy the data, add the needed rows, and right align the two newly added rows for each entry.
For Each Cls In Range("C2:C" & Rws) MyStr = "A" & Cls.Row: Cls.Offset(, -2).Value = MyStr With Cells(Rows.Count, "A").End(xlUp).Offset(1) .Value = MyStr & "A": .Offset(, 2).Value = "A" .Offset(1).Value = MyStr & "B": .Offset(1, 2).Value = "B" .Offset(, 2).Resize(2).HorizontalAlignment = xlRight End With Next Cls Columns("A:C").Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1 Columns("A:A").Delete End Sub
Bookmarks