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

Selecting the first free cell 1

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi,
Can anyone point me in the direction of the correct code for finding the first free cell within Col A on a worksheet.

Thanks in advance
 


Hi,

I would advise against SELECTING the cell, but rather REFERENCING the cell...
Code:
dim rNext as range
set rNext = cells(cells.count, "A").end(xlup).offset(1)


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
thanks skip, however I get a runtime error 1004 on the Set rNext = Cells....

I expect I've missed something
 



Sorry [blush]
Code:
dim rNext as range
set rNext = cells(cells.ROWS.count, "A").end(xlup).offset(1)


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks Skip, hope you see the star. it's really a cumulative one for all the help that you've given me recently.
 



Glad to help. :)

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

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

Part and Inventory Search

Sponsor

Back
Top