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: Fergus Jones   on Oct 08

Check out the help on FIND in the visual basic editor. The easiest way to do
this is to click on the word find... No need to select the whole word... and
press F1.

You could also look at http://www.cpearson.com/excel/RangeFind.htm ... Chip
Pearsons site. It's a wonderful excel  VBA reference!

The help will tell you that Find is to look for stuff within a range.

To search  within a range  use something like...

Set rlFRange = Range("invoiceno")
Set rlFound = rlFRange.Find( _
What:="TTT", _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)

Note that I've...
1 Set the range to look in at the top
2 Am NOT using the After parameter
3 Looking for "TTT". This should be replaced by your variable

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: