View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default finding cell value when formula

Hi,

Check the online help for the full parameter list of the Find function:
expression.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection,
MatchCase, MatchByte, SearchFormat)

Using the Lookin:=xlValues should work.

something like:
wks.Cells.Find( what:=wks.Range("countryname").Value, _
after:= wks.Range("countryname") , lookin:=xlvalues ).Select

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"caroline" wrote:

I am trying to find the content of range("countryname") within the whole
sheet to scroll to it. I am using the following code, but it does not work
because the cells I am trying to find contain the country name as formulae.
it works only when the country name is written not as formulae. Any idea?

Dim wks As Worksheet
Set wks = ActiveSheet

wks.Cells.Find(wks.Range("countryname").Value,
wks.Range("countryname")).Select

ActiveWindow.ScrollRow = Selection.Row



--
caroline