Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default how to check if range contains particular word

i need to check via macro to see if range"A1:A20" contains a particular word
.. the word comes from another range via ....for each cell in range




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default how to check if range contains particular word


If IsError(.Match(cell.Value, myRng, 0)) Then
'not found
Else
'found
End If


--
HTH

Bob Phillips

"Sunil Patel" wrote in message
...
i need to check via macro to see if range"A1:A20" contains a particular

word
. the word comes from another range via ....for each cell in range






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to check if range contains particular word

if a whole word match (the cell contains only that word):

if application.Countif(Range("A1:A20"),Range("B9")) 0 then

if not, post back.

--
Regards,
Tom Ogilvy

"Sunil Patel" wrote in message
...
i need to check via macro to see if range"A1:A20" contains a particular

word
. the word comes from another range via ....for each cell in range






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
Check for a word Kashyap Excel Worksheet Functions 18 April 29th 09 08:40 PM
Paste Word Check Box Form Field Link into Excel VAB Charlie Excel Discussion (Misc queries) 0 September 15th 06 04:52 PM
I need a bank check template for word or excel Tom Excel Discussion (Misc queries) 1 June 14th 06 05:16 PM
Auto spell check as in word NC Excel Discussion (Misc queries) 2 January 27th 05 05:43 PM
Check if a range is a sebset of another range Bob Phillips[_6_] Excel Programming 0 May 6th 04 04:12 PM


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