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

find next empty cell in column

Status
Not open for further replies.

MrsTFB

MIS
Oct 3, 2000
307
US
I'm trying to add data at the end of a list in Excel97. I know there is an ISEMPTY command, but I can't find enough information on it to make it work.

I want to go across from the cell, but I think I will be able to code that, I just don't know how to determine the next available cell.

To this point, I've been adding a row at the top, putting in the data and then creating a sort to put the row at the bottom.

I know there is a better way. Any help appreciated.

Bsimm
 
Create a module with the following:

Sub findLastCell()
Dim firstBlank As Range
'set a range variable to the first blank
Set firstBlank = Range("A1").End(xlDown).Offset(1, 0)
'display the cell found
Range("A1").End(xlDown).Offset(1, 0).Select
End Sub

You will need to change the bolded part to suit the particular column you are wanting to use.

In this case...the code is assuming that you want to look for the last empty cell in column A.

Hope this helps.

 
"In this case...the code is assuming that you want to look for the last empty cell in column A."

Correction on the above line...it should read,

"In this case...the code is assuming that you want to look for the first empty cell in column A."
 
Great! Thanks for the help. I'll give that a try later on today.

Bsimm
GO TITANS!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top