Help - lookup range with cell containing multiple values

chongli

New Member
Joined
Jan 27, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I've run into a problem that I'm struggling to solve alone. With reference to the attached picture, column S contains billing codes that cannot be used in conjunction with their corresponding value in column C.
The aim is to have this instance flagged if column C contains any of the values in column S - as per highlighted row 12

The problem specifically relates to row 15 which has several corresponding items in column S for that billing code.

How am I able to search multiple values in S15 to match against the values in column C?

I hope this description makes sense. Let me know if you need a further breakdown. Any help is appreciated.
 

Attachments

  • Example.jpg
    Example.jpg
    152.1 KB · Views: 12

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I don't have excel 365 but you can try this.
Excel Formula:
=IF(SUM(IFERROR(SEARCH(TEXTSPLIT(SUBSTITUTE(S12," ",""),,","),C12),0))=0,"no match","match found")
 
Upvote 0
I slightly amended the formula to match the range in column C. However, it only works for single values in column S. Still doesn't appear to be splitting multiple values in S15 by comma to search.

Excel Formula:
=IF(SUM(IFERROR(SEARCH(TEXTSPLIT(S15,,","),[B]$C$12:$C$26[/B]),0))=0,"no match","match found")
 
Upvote 0
Actually, just realised the formula does work but only if the values in S15 are entered above C15 and not below. Any idea why this might be happening?

Excel Formula:
=IF(SUM(IFERROR(SEARCH(TEXTSPLIT(SUBSTITUTE(S15," ",""),,","),$C$12:$C$26),0))=0,"no match","match found")
 
Upvote 0
Apologies for spamming the thread but unable to see edit.

Upon further testing, it appears that S15 is only identifying MR240 when entered in column C and none of the other values from S15
 
Upvote 0
It will work on one cell at a time. Why are u adding the range in it? Didn't you want to search the values of s12 in c12 and so on? I tested it and it was working fine? Just enter it one of the column and drag it down. Maybe you didn't explain what you want properly.
 
Last edited:
Upvote 0
It will work on one cell at a time. Why are u adding the range in it? Didn't you want to search the values of s12 in c12 and so on? I tested it and it was working fine? Just enter it one of the column and drag it down. Maybe you didn't explain what you want properly.

Ok, what I need is for it to search the value(s) in S12 against the range in c12-c26 for their presence to confirm a "match found". If the value(s) in S12 are not in C12-26 then "no match".

I previously used guiding cells and XLOOKUP to match for single items, but this failed to identify multiple values in a single cell of column S

The formula you provided will only search against the single line which will always be "no match" in my case because the item(s) in column S that correspond with C are bound on another referenced sheet. I've attached a picture of the reference sheet, so hopefully this helps to understand why that's the case. I appreciate your assistance with this.
 

Attachments

  • reference sheet.jpg
    reference sheet.jpg
    149.7 KB · Views: 4
Upvote 0
Okay if this doesn't do it idk.
Excel Formula:
=IF(SUMPRODUCT(COUNTIF($C$12:$C$26,TEXTSPLIT(SUBSTITUTE(S12," ",""),,",",1)))=0,"No match","Match found")
 

Attachments

  • 1674897279441.png
    1674897279441.png
    31.2 KB · Views: 4
Upvote 0
Solution

Forum statistics

Threads
1,216,073
Messages
6,128,637
Members
449,461
Latest member
kokoanutt

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