Thread: Next blank cell
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
royUK[_54_] royUK[_54_] is offline
external usenet poster
 
Posts: 1
Default Next blank cell


You could use


Code:
--------------------
Dim lastRow As Long
lastRow = ActiveSheet.Cells(Rows.Count, 14).End(xlUp).Row + 1
--------------------


Or create a function


Code:
--------------------
Option Explicit

Function lastRow(Col As Long) As Long
lastRow = Cells(Rows.Count, Col).End(xlUp).Row + 1
End Function

Sub test()
MsgBox lastRow(14)
End Sub
--------------------


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site
' (http://www.excel-it.com)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=33672