Hello,
I been trying to get this code to work, but I am not able to define the last cell from where autofill should start, Could someone help me on this?
Dim a As Long
For a = 25 To 72
If Range("A" & a).Value = "" And Range("B" & a) <> "" Then
'what to do if cell is empty
Range("A" & a) = "AK"
Dim lastrow As Long
lastrow = Worksheets("sheet1").Range("B65536").End(xlUp).Row
With Worksheets("Sheet1").Range("A25")
.autofill Destination:=Range("A25:A" & lastrow&) "WHAT CHANGES SHOULD I MAKE HERE SO THAT INSTEAD OF CELL A25 IT WILL TAKE THE CELL VALUE OF RANGE("A" & a)"
End With
Exit For
End If
Next a
Thanks,
Aadesh Gandhi
Bookmarks