Thread: countnonblank
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default countnonblank


Sub Tst2()
Dim varnbrows As Double
Range("A1").Select
varnbrows = Selection.CurrentRegion.Rows.Count
If Selection.Value = "" Then
Exit Sub
ElseIf Selection.Offset(1, 0).Value = "" Then
Selection.Offset(1, 0).Select
Else
Selection.Offset(varnbrows, 0).Select
End If
End Sub

this will take you to the first empty cell in column A

copy and paste it into a module make a button assign this macro to it


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=519034