Thread: [Solved] Lastrow definition problem
View Single Post
 
Old 09-26-2012, 10:08 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,385
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The simplest approach in that case would be to use the Find function to find 'blank' in the column of interest, get it's row and deduct 1:
Code:
Dim LastRow As Long
LastRow = 0
On Error Resume Next
LastRow = ActiveSheet.Range("Q:Q").Rows.Find("blank").Row - 1
MsgBox LastRow
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote