I am trying to update value 1 from the previous lastrow to the new lastrow and the code is below. I know I can use "H2:H" & lastrow. But I get an error "Method Range of Object Global Failed" when I use the previous lastrow+1 to the new lastrow using the below syntax. Any help is much appreciated!
Function test()
Dim lastrow As Long
Dim clastrow As Long
lastrow = Worksheets(1).Cells(Rows.count, "a").End(xlUp).Row
clastrow = Worksheets(1).Cells(Rows.count, "a").End(xlUp).Row + 1
Range("H & clastrow:H" & lastrow).Value = "1"
End Function