Hi,
I have thousands of rows, just one column.
Basically I want to transform from
A
B
C
to
equivalent rows of each cell; e.g.
A
A
A
B
B
B
C
C
C
Do I need to write Macro to accomplish that? Sorry, I am new to Macro.3
Thanks so much.
Wei
Hi,
I have thousands of rows, just one column.
Basically I want to transform from
A
B
C
to
equivalent rows of each cell; e.g.
A
A
A
B
B
B
C
C
C
Do I need to write Macro to accomplish that? Sorry, I am new to Macro.3
Thanks so much.
Wei
![]()
Public Sub AddRows() Dim lastrow As Long Dim i As Long Application.ScreenUpdating = False With ActiveSheet lastrow = .Cells(.Rows.Count, "B").End(xlUp).Row For i = lastrow To 5 Step -1 .Rows(i + 1).Resize(2).Insert .Cells(i, "B").Resize(3).Value = .Cells(i, "B").Value Next i End With Application.ScreenUpdating = True End Sub
Your use of letters is probably just an example, but this will also do it for you without VBA.
Enter A in A3, then use this, copied down...
=IF(MOD(ROW(),3)<>0,AG3,CHAR(CODE(A3)+1))
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)
Hi FDibbins, I have marked it as solved and clicked on the star. Thanks again
Thank you, always appreciated![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks