ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to check if range contains particular word (https://www.excelbanter.com/excel-programming/333490-how-check-if-range-contains-particular-word.html)

Sunil Patel

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





Bob Phillips[_7_]

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







Tom Ogilvy

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








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com