Thread: Macros in excel
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Macros in excel

First off, since the cell will be empty, nothing will be displayed in the
MessageBox. I'm guessing you accidentally left off a reference to the
address property (.Address). However, your approach might not always produce
the correct result. For example, what do you get if all the cells in A12:A20
have entries in them *except* for A13 and a15?

--
Rick (MVP - Excel)


"Ryan H" wrote in message
...
This should do it. Hope this helps! If so, let me know, click "YES"
below.

Sub FindFirstEmptyCell()
MsgBox Range("A12:A20").End(xlDown).Offset(1)
End Sub
--
Cheers,
Ryan


"plugger" wrote:

how to find first empty cell in a selected column ie A12:A20 with a macro