Currently I have a spreadsheet that was working but isn't anymore. I want the macro to insert a blank row after every instance of a word that starts with "G". Currently, nothing happens. Here is the part of the code:
[TABLE="width: 404"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thank you,
Clara
[TABLE="width: 404"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Code:
Dim LR As Long, Rw As Long
Application.ScreenUpdating = False
LR = Range("g" & Rows.Count).End(xlUp).Row
For Rw = LR To 2 Step -1
If Cells(Rw, "G") <> Cells(Rw - 1, "G") Then
Rows(Rw).Insert xlShiftDown
End If
Next Rw
Application.ScreenUpdating = True
End With
Thank you,
Clara
Last edited by a moderator: