View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
BigJimmer BigJimmer is offline
external usenet poster
 
Posts: 37
Default .find not finding formula result

By default the find is looking at what is typeed in formulas (LookIn:=
xlFormulas), not the results of the formulas.

Try something like this....

Set sc = ActiveWorkbook.Sheets("Region").Rows("4:4").Find(W hat:=lstore,
After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False

"Aaron" wrote:

Set sc = ActiveWorkbook.Sheets("Region").Rows("4:4").Find(l store)

lstore value is "chicago". When a cell in row 4 has a value of "chicago",
the line works fine. But when a cell in row 4 has a formula that results in
"chicago", sc is Nothing. What am I doing wrong?