macro to find the last blank cell in col. A
Assuming that column A has a contiguous block of data until the next blank
cell is reached, the following macro should do the trick:
Sub LastBlankCell()
Dim varVal As Variant
Dim l As Long
varVal = Range("A1").Value
Do Until varVal = ""
l = l + 1
varVal = Range("A1").Offset(l).Value
Loop
Range("A" & (l + 1)).Select
End Sub
--
Kevin Backmann
"peyman" wrote:
hi guys,
how can I write a Macro to set the Activecell in the activesheet on the last
blank cell in column A?
thanks in advance.
peiman
|