Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Last Cell (with a twist) 1

Status
Not open for further replies.

pluto1415

MIS
Apr 28, 2009
78
US
I've got an Excel spreadsheet (designed by an outside source - I cannot change it's formatting) that basically has a bunch of header rows (23), a couple empty rows, then rows of data (anywhere from 2 - 5000), a couple more empty rows, then a couple footer rows. What I need to do is start at A26 find the last of the data rows that is populated. So basically, start at a26, find the first empty row, then -1.

I've found this suggested several places: Columns("A:A").Find(What:="", LookAt:=xlWhole).Row

But I'm not really looking for the very first empty row, I'm looking for the first one AFTER row 26 and I'm not sure how to modify this.
 


hi,

LAST row in the data...
Code:
dim lLastRow as long

with [A26].CurrentRegion
  lLastRow = .Rows.Count + .Row - 1
end with


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


I prefer mine, shaken, not stirred -- no twist. ;-)

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top