LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Going Bananas

Lexette,

You can use the Like operator with wildcards to test the contents
of the cell. For example,

If Range("A1").Value Like "*banana*" Then

You could also use the InStr function. E.g.,

If InStr(1,Range("A1").Value,"banana") 0 Then



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Lexette" wrote in message
...
Hi and HELP

If cell = " banana" then is great when banana is the
only content in the cell. I have cells that contain "
banana/1234567" and the number can change every time but I
still want to do something with the contents of the cell
because it contains the word "banana" is there a way to
say If cell [contains the word] "Banana" Then

Many Thanks Lexette



 
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



All times are GMT +1. The time now is 06:42 AM.

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

About Us

"It's about Microsoft Excel"