#1
|
|||
|
|||
Lastrow definition problem
Hello, so far, I've been using this to take into account all the data until the last non-blank data from a column:
Code:
LastRow2 = Range("Q" & Rows.Count).End(xlUp).Row Range("V52").Select Selection.AutoFill Destination:=Range("V52:V" & LastRow2) So if I had from V52: a b c d e f g blank blank blank Last row would stop at "g". Is that possible? |
#2
|
||||
|
||||
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] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
definition of work column | ketanco | Project | 9 | 05-31-2012 05:15 PM |
font in style definition trashed | eNGiNe | Word | 1 | 03-30-2012 05:03 AM |
Dumping styles definition | gouletp | Word | 3 | 09-06-2011 10:29 AM |