View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bryan Dickerson Bryan Dickerson is offline
external usenet poster
 
Posts: 42
Default Find a value in a column

"eligible for rebate" is actually the start of the phrase in the contents of
the cell--the full contents might be something like "Eligible for rebate
$600 if order by 12/01/05". I made sure that the MatchCase is false so that
if they don't capitalize it, then it should still be found. I tried
searching for just "for rebate" and still nothing. I keep thinking it's the
".Row" property on the end, but if it works for you guys, then maybe it is
acceptable. What other things would you guys try to see what is wrong or to
perhaps do it another way?

"Dave Peterson" wrote in message
...
xlpart should take care of the trailing spaces--but not embedded
spaces--or
other typos!

Bob Phillips wrote:

Bryan,

It works fine for me. Are you sure that the item in column C doesn't have
trailing spaces in it, which would cause a mis-match.

--
HTH

Bob Phillips

"Bryan Dickerson" wrote in message
...
I'm trying to run the following Find command in VBA:

sERRow = oWkSht.Columns("C").Find(What:="eligible for rebate",
After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,

SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Row

Once I find the text, I need to parse out the contents of the cell, but
currently the text is not being found. I know the text is there and I

have
tried recording a macro to see what steps Excel would use. I also know

that
I lose the Intelli-Sense when I add the .Row onto it. If there's a
better
way to do it, please let me know.

Thanx!

--
TFWBWY...A



--

Dave Peterson