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

checking a row for cells which contain values in exel 1

Status
Not open for further replies.

Llarian1981

Technical User
Oct 24, 2005
15
DE
hello,

I need to write an algorithm which finds the last cell in a row that contains a value for a exel worksheet. In the row, I have cells which contain a value, and cells which are empty, so I cannot check every cell for containing a value. How to do that?

llarian1981
 


Hi,

Does the search value appear more than once in the column?

Is the column sorted?

Skip,

[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue]
 
I don't know the value the cell will contain. The value will be entered by a user. I could ask the user to input the adress of the last cell containig or I could ask the user to input the value the last cell will contain. But I am trying to automate the procedure as much as possible. I cannot sort the row, because I need the adress of the last cell, not its value!
 


Sorry, I misunderstood.

Start your macro recorder

select the LAST cell in the row (IVn)

[End] [Left Arrow]

You now have the last cell in the row containing a value

Turn off your macro recorder

Post your code -- we can help.

We can return the column number value. What are you going to do with the Column Number?

Skip,

[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top