Array formula to search multiple columns for character string in a list

tgk

New Member
Joined
Feb 16, 2011
Messages
8
Can an array formula search multiple columns for a string of characters in a list?
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
The list is a series of codes, which can be arranged in a row, in a column or even in a single cell.
<o:p></o:p>
The spreadsheet has 3 columns. The cells in the columns may be empty, or may contain a string of characters. Some rows will contain cells with duplicate strings, and some may have iterations of the same string in several cells (see rows 5 and 6 in the example below).
<o:p></o:p>
The first 4 characters of each string will contain one of the listed codes.
<o:p></o:p>
Any suggestions are welcome.
<o:p></o:p>
Thanks!
<o:p></o:p>
<o:p></o:p>
...........A...........................................B......................... C.........................
1.. 5210-5090-R-SUM3........5210-5090-R-SUM3....................................
2...........................................9610-5090-R-SUMM..................................
3...........................................5410-5090-R-FALL.........5410-5090-R-FALL
4.. 5243-5090-10STOR............................................................................
5.. 5243509010STOR...........5243509010STORCL...................................
6.. 9228................................9228-050........................92285050BSA......

Codes
5210
5243
5410
5723
9228
9610
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
So what are your expected results here? Are you wanting to see if your list of codes exists in the data somewhere in A1:C6 in the first 4 characters?
 
Upvote 0
Based on what I said before:
Excel Workbook
ABC
15210-5090-R-SUM35210-5090-R-SUM3
29610-5090-R-SUMM
35410-5090-R-FALL5410-5090-R-FALL
45243-5090-10STOR
55243509010STOR5243509010STORCL
692289228-05092285050BSA
7
8Codes
95210Exists
105243Exists
115410Exists
125723Doesn't Exist
139228Exists
149610Exists
Sheet2
Cell Formulas
RangeFormula
B9=IF(COUNTIF($A$1:$C$6,A9&"*") > 0,"Exists","Doesn't Exist")
B10=IF(COUNTIF($A$1:$C$6,A10&"*") > 0,"Exists","Doesn't Exist")
B11=IF(COUNTIF($A$1:$C$6,A11&"*") > 0,"Exists","Doesn't Exist")
B12=IF(COUNTIF($A$1:$C$6,A12&"*") > 0,"Exists","Doesn't Exist")
B13=IF(COUNTIF($A$1:$C$6,A13&"*") > 0,"Exists","Doesn't Exist")
B14=IF(COUNTIF($A$1:$C$6,A14&"*") > 0,"Exists","Doesn't Exist")
 
Upvote 0
After reading what you just stated, you want to create the code list that is below the data?
 
Upvote 0
If the formula finds a matching code in columns A, B, or C, can it show the matching code in column D of each row? Some rows will not have a matching code, so those answers can be blank, an asterick, whatever.
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,949
Latest member
Dupuhini

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