I would like to copy the content from cells above blank cells to subtotal rows. (In this example, columns A, C and D). The last row should be determined by Column B, which contains the filter for the subtotals.
There is something wrong with my syntax, and I can't figure it out.
My code is (for column A)
Sub Fill()
Dim Last_RowB As Long
LastRow = sht.Cells(sht.Rows.Count, "B").End(xlUp).Row
Range("A" & Last_RowB).Select
.SpecialCells(xlCellTypeBlanks).Formula = "=R[-1]C"
.Value = .Value
End Sub
Thanks in advance

There is something wrong with my syntax, and I can't figure it out.
My code is (for column A)
Sub Fill()
Dim Last_RowB As Long
LastRow = sht.Cells(sht.Rows.Count, "B").End(xlUp).Row
Range("A" & Last_RowB).Select
.SpecialCells(xlCellTypeBlanks).Formula = "=R[-1]C"
.Value = .Value
End Sub
Thanks in advance