Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default finding cell value when formula

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default finding cell value when formula

wonderful thanks
--
caroline


"sebastienm" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
finding the cell adjacent to the max value in a row with formula NDBC Excel Discussion (Misc queries) 6 July 31st 09 11:16 AM
Finding a position in a Cell using a formula jxbeeman Excel Discussion (Misc queries) 11 May 30th 09 02:40 AM
Formula finding last cell in row containing data AbbieW Excel Worksheet Functions 3 July 11th 07 02:03 AM
Formula for finding next cell with data? Tom Watt Excel Discussion (Misc queries) 9 September 15th 06 02:55 PM
best formula for finding a cell value? tommyf Excel Discussion (Misc queries) 4 November 2nd 05 09:31 PM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"