View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
ozgrid.com ozgrid.com is offline
external usenet poster
 
Posts: 464
Default Finding Next Empty Cell in a Range

Try along the lines of;

Sub FindBlank()
Dim rBlank As Range

On Error Resume Next
Set rBlank = _
Range("A1").CurrentRegion.SpecialCells(xlCellTypeB lanks)(1, 1)
On Error GoTo 0

If Not rBlank Is Nothing Then
MsgBox "Next blank cell in your table is " & _
rBlank.Address
Else
MsgBox "No blanks in range: " & _
Range("A1").CurrentRegion.Address
End If
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"Stilltrader47" wrote in message
...
My worksheet is set-up for 12 month price tracking. The entry range is 12
rows (months) by 31 columns (days). How can I write a macro that will
locate
the cursor to the next empty cell in the range? What I am looking for is
an
efficient "find" command. I would prefer to execute by ctl-(letter) if
possible.

Thanks for helping.