HI All,
This is my very first forum message over here.
I m trying to update all the blank cells in A with the Value starting with "Try" until the column A encounter "Totals" value in cell. Then continue doing this step for the rest of the spreadsheet like, Try 2 for the next lot.
I have attached my excel data the data to copy is in yellow and the data to be updated to is in red.
Here is the VBA for the excel file which doesnt do what I need it to do.
Any help ASAP would be appreciated.
Thanks.
Sub Update()
Dim LRow As Integer
LRow = 1
'Move through records until an empty cell is found in column A
While IsEmpty(Range("B" & CStr(LRow)).Value) = False
'If cell B displays "Extn." then move the row to
If Range("B" & CStr(LRow)).Value = "Extn." Then
'Move the row
LRow = LRow - 1
Range("C" & LRow & ":C" & LRow).Select
Selection.Copy
LRow = LRow + 1
Do While IsEmpty(Range("C" & CStr(LRow)).Value) = True
Range("A" & LRow + 1).Select
ActiveSheet.Paste
Loop
End If
LRow = LRow + 1
Wend
End Sub
This is my very first forum message over here.
I m trying to update all the blank cells in A with the Value starting with "Try" until the column A encounter "Totals" value in cell. Then continue doing this step for the rest of the spreadsheet like, Try 2 for the next lot.
I have attached my excel data the data to copy is in yellow and the data to be updated to is in red.
Here is the VBA for the excel file which doesnt do what I need it to do.

Any help ASAP would be appreciated.
Thanks.
Sub Update()
Dim LRow As Integer
LRow = 1
'Move through records until an empty cell is found in column A
While IsEmpty(Range("B" & CStr(LRow)).Value) = False
'If cell B displays "Extn." then move the row to
If Range("B" & CStr(LRow)).Value = "Extn." Then
'Move the row
LRow = LRow - 1
Range("C" & LRow & ":C" & LRow).Select
Selection.Copy
LRow = LRow + 1
Do While IsEmpty(Range("C" & CStr(LRow)).Value) = True
Range("A" & LRow + 1).Select
ActiveSheet.Paste
Loop
End If
LRow = LRow + 1
Wend
End Sub