Need help with one line of macro

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I need to write a macro that finds the first blank cell in Column A, and
activates that cell. I don't know how to write it. What I have so far is an
English language phrase that says what the If statement should do, below.
Can someone tell me how to write this so it works in Excel 2000 and 2003?
Many thanks!

Sub FindBlank()
'
'
For Each c In Range("A1:A4000").Cells
If c is blank Then Activate that cell and Exit For
Next
End Sub
 
For each c in range("a1:a4000").cells
if isempty(c) then
c.activate
exit for
end if
next c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top