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

Find a certain Cell and print its adress

Status
Not open for further replies.

luzifer

Technical User
Mar 18, 2002
4
US
hi folks,

this one is certainlz easy, still im not able to figure it out.

i got a big list with lots of empty cells in the beginning.
what i want to do is a macro, which finds me a certain entry in a row (in this case "GF").
then i want it to print the address of the cell (ie: a2) into another one, or store it as parameter to give it to another step.

i hope this is clear enough :)

thanx
chris
 
ok, i figured this one out. it works with the .address command.

but now i need to move in this row to the right till i hit the first entry. then cut it and paste it somewhere differnet.

thanx
 
ok - so presumably you have a line like

startAdd = activecell.address

To find the 1st cell with contents to the right of this cell, you can use:

FinalAdd = Range(startAdd).end(xltoright).address

You don't actually need the address object though - it may be easier to use the range object...

Dim stRng as range, FinRng as range

set stRng = Range("A7") - you would use whatever method you currently have for finding "GF" and set stRng = the range rather than the range.address

You can then use

FinRng = stRng.end(xltoright).address


Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top