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