This is an example of sheet (sheet 2) I have,
A B
10
20
30
40
50
I am trying to hardcode a value, say "Data" to column A in my sheet 2 till the last row of column B so my output will look something like this
A B
Data 10
Data 20
Data 30
Data 40
Data 50
Currently I am using the below code but am getting an error! How to achieve at this.
Sub AddData()
Sheets("Sheet2").Range("A2:A" & LastRow).Value="A"
End Sub