Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Find specific cell value

Hello,

I have two cells. One cell contains the text "dollar pop". The other
contains the text "pop". I am attempting to use the "Find" method to find
the cell that contains "pop". However, it finds "dollar pop" (the location
of this cell is before "pop").

How can I find a cell that matches an exact text value ("pop"), not a cell
that contains the search text plus possibly other text in addition ("dollar
pop")?

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default Find specific cell value

..Find(What:="pop", LookAt:=xlWhole)

Sharad

"nathan" wrote in message
...
Hello,

I have two cells. One cell contains the text "dollar pop". The other
contains the text "pop". I am attempting to use the "Find" method to find
the cell that contains "pop". However, it finds "dollar pop" (the
location
of this cell is before "pop").

How can I find a cell that matches an exact text value ("pop"), not a cell
that contains the search text plus possibly other text in addition
("dollar
pop")?

Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find specific cell value

Use the arguments to the find method. In this case the Lookat argument:
set rng = Cells.Find("pop", Lookin:=xlValues, _
.Lookat:=xlWhole, MatchCase:=False)

See excel vba help on the find method of the range object for details.

--
Regards,
Tom Ogilvy


"nathan" wrote in message
...
Hello,

I have two cells. One cell contains the text "dollar pop". The other
contains the text "pop". I am attempting to use the "Find" method to find
the cell that contains "pop". However, it finds "dollar pop" (the

location
of this cell is before "pop").

How can I find a cell that matches an exact text value ("pop"), not a cell
that contains the search text plus possibly other text in addition

("dollar
pop")?

Thank you.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Find specific cell value

quite simple, thank you.

"Sharad Naik" wrote:

..Find(What:="pop", LookAt:=xlWhole)

Sharad

"nathan" wrote in message
...
Hello,

I have two cells. One cell contains the text "dollar pop". The other
contains the text "pop". I am attempting to use the "Find" method to find
the cell that contains "pop". However, it finds "dollar pop" (the
location
of this cell is before "pop").

How can I find a cell that matches an exact text value ("pop"), not a cell
that contains the search text plus possibly other text in addition
("dollar
pop")?

Thank you.




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
Find specific words in a cell containing a conversation Mattlynn via OfficeKB.com Excel Worksheet Functions 2 October 7th 09 12:29 PM
How do I find a cell starting with a specific letter? Bking Excel Discussion (Misc queries) 5 July 18th 05 05:14 AM
Find last cell in a specific column Eva Shanley[_2_] Excel Programming 2 September 8th 04 09:01 PM
How to find and sub total a specific number of cell above the target cell jane Excel Programming 1 January 21st 04 03:37 PM
use find twice to find cell on a specific row captbluefin[_6_] Excel Programming 2 November 1st 03 08:22 PM


All times are GMT +1. The time now is 11:04 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"