J
Jaz
Spreadsheet contains a data range from cell A4 that is
refreshed regularly with updated data. Column A contains a
list of cities and is sorted A-Z. I am trying to cretae
macor that will insert a blank row between each change of
city all the way down. Cuurent attempt as follows but does
not work?
Dim strstate As String
strtate = ActiveCell
ActiveCell("a4").Select
Do
If strstate = ActiveCell.Offset(-1, 0) Then
ActiveCell.Offset(1, 0).Select
Else
rowSelection.Insert Shift:=xlDown
ActiveCell.Offset(3, 0).Select
Loop Until ActiveCell.Offset(2, 0) = Empty
End Sub
refreshed regularly with updated data. Column A contains a
list of cities and is sorted A-Z. I am trying to cretae
macor that will insert a blank row between each change of
city all the way down. Cuurent attempt as follows but does
not work?
Dim strstate As String
strtate = ActiveCell
ActiveCell("a4").Select
Do
If strstate = ActiveCell.Offset(-1, 0) Then
ActiveCell.Offset(1, 0).Select
Else
rowSelection.Insert Shift:=xlDown
ActiveCell.Offset(3, 0).Select
Loop Until ActiveCell.Offset(2, 0) = Empty
End Sub