L
LucyN
I posted last week with the same question, was suggested this code. It
actually deletes my entire data set.
I need a macro to
move the numbers up to Bangor and delete the space between the two rows.
BANGOR ME . . . . . . . . .
54 54 45 45
BATON ROUGE LA. . . . . . .
65 56 56 87
Sub Copydata()
Dim lr As Long, lc As Long, i As Long
lr = ActiveSheet.UsedRange.Rows.Count
lc = ActiveSheet.UsedRange.Columns.Count
For i = lr To 2 Step -2
Range(Cells(i, 2), Cells(i, lc)).Copy Cells(i - 1, 2)
Rows(i).Delete
Next i
End Sub
actually deletes my entire data set.
I need a macro to
move the numbers up to Bangor and delete the space between the two rows.
BANGOR ME . . . . . . . . .
54 54 45 45
BATON ROUGE LA. . . . . . .
65 56 56 87
Sub Copydata()
Dim lr As Long, lc As Long, i As Long
lr = ActiveSheet.UsedRange.Rows.Count
lc = ActiveSheet.UsedRange.Columns.Count
For i = lr To 2 Step -2
Range(Cells(i, 2), Cells(i, lc)).Copy Cells(i - 1, 2)
Rows(i).Delete
Next i
End Sub