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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to find last empty caee Error 438 object does not support this property

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I am trying to Select the last empty cell in column D I have tried a couple of different methods with no luck. My current attempt is what follows. Any help would be appreciated.

Tom

Code:
Range("D" & Rows.Count).End(xlUp).Row + 1

[\code]
 
I found out a formula that works.
ActiveSheet.Range("D8").End(xlDown).Offset(1, 0).Select

Tom
 
I would always go up for first empty cell in case of blanks on the column:

dim lrow as long
with sheets("Sheetname")
lRow = .cells(.rows.count,4).end(xlup).row
end with


Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Please ask VBA questions in forum707.

Skip,

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

Sorry, I will do that in the future.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top