Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Donna Thompson   on Oct 08 In MS Office Category.

  
Question Answered By: Eula Armstrong   on Oct 08

I sometimes use the code  below to look for a cell. It's based arounf the VBA
"Find" which is well documented in the help.
It returns a "range", which you can then do things with including going to
it and getting it's address.

You'll see that I've included a second "parameter" for the function. If the
parameter isn't given then it will default to the first found, Otherwise it
will loop around finding the Nth occurence of the search  string.

If the search string isn't found  at all then it gives a message... "Not
found".

You could call this from a sub.... Something like...

Sub subFindAndGetAddress()

Dim rlFound as range

Set rlFound = fncLookForCell("Search String")
rlFound.Select
MsgBox rlFound.Address

End Sub

This is an example but should give  you something to bite on.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Search then go to particular cell Or get search suggestion and latest updates.


Tagged: