Elegant Solution for Searching for Multiple Strings in Multiple Cells using NAME?

jbrousseau

New Member
Joined
Apr 12, 2007
Messages
30
Hi everyone -

I currently have a working Excel Workbook that I am using to search multiple cells for an array of strings. I have condensed the strings in the array for purposes of posting on this site (there are dozens of strings to search for). Ideally, I'd like to put all the text in the array (ie., "Windows", "Win", etc.) into a NAME and just update the NAME as needed, but this has proven difficult.

In Cells A2:A1000, are values identifying the platform (eg., "Windows", "Linux", "Common").
In Cells B2:B1000, C1:C1000 and D1:D1000 are various strings of text.
In Cells E2:E1000, the formula: =IF(OR(A2="LINUX",A2="COMMON"),"N/A",IF(OR(COUNT(SEARCH({"Windows","Win","XP"},B2)),COUNT(SEARCH({"Windows","Win","XP"},C2)),COUNT(SEARCH({"Windows","Win","XP"},D2))), "VIOLATION", "COMPLIANT"))


Any help would be much appreciated.

Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You could list all the text somewhere on the worksheet then name that range TextList and use this "array formula"

=IF(OR(A2={"LINUX","COMMON"}),"N/A",IF(COUNT(SEARCH(TextList,B2&"-"&C2&"-"&D2)),"VIOLATION","COMPLIANT"))

formula needs to be confirmed with CTRL+SHIFT+ENTER
 
Upvote 0
Would it be possible to make this case-sensitive? I've been playing around with FIND, but I can't seem to make it work correctly.
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top