If List Contains a Value which is not in another List

VladoR

New Member
Joined
Mar 23, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have one report in which is one column in which all the values should be picked from another list. I would like to make a check field, which would show e.g. 1 (or sum of 1s) if in the column is a value, which is not in another list. Here is an example.

Column1 (unique values)
A
B
C

Column2 (consolidated inputs)
A
B
A
B
A
B
C
D

I would like to display 1 if in Column2 is a character that is not listed in Column1 or zero if all characters in Column2 are in Column1 as well.

Do you have any idea how to do it, please?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Maybe
Excel Formula:
=COUNT(FILTER(ROW(B2:B20),(LEFT(B2:B20,6)="Fin001")*(ISNA(MATCH(B2:B20,A2:A10,0)))))
 
Upvote 0
Hi Fluff,

thank you for your response. That formula returns the number 17 for me, which is the number of correctly entered values. I'm trying to adjust the formula, but without any significant results, but at least I'm starting to understand how it works.

@hello Kvsrinivasumurthy,
I tried it, but I'm getting always number 1 as a result. The column1 includes FIN001* (tried FIN001, *FIN001* as well) and column 2 includes various entries some of them starting with FIN001-.
 
Upvote 0
If the formula is not working how you want, then please post some accurate sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
CAPEX_Tracker_MEC_2021_Actual_Forecast_Template_2022.xlsx
ABCDEF
1Column1Column2Result:5
2FIN001FIN001-123456
3FIN001-123456
4FIN001-789789
5
6FIN001-789789
7FIN002-123123
8
9FIN001-111222
Sheet4
Cell Formulas
RangeFormula
F1F1=COUNT(FILTER(ROW($C$2:$C$9),(LEFT($C$2:$C$9,6)="FIN001")*(ISNA(MATCH($C$2:$C$9,$A$2:$A$3,0)))))


Thank you. The result should be 1 instead of 5. There is one cell starting with FIN002.
 
Upvote 0
Thanks for that, how about
Excel Formula:
=COUNT(FILTER(ROW($C$2:$C$9),(TRIM($C$2:$C$9)<>"")*(ISNA(MATCH(LEFT($C$2:$C$9,6),LEFT($A$2:$A$3,6),0)))))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

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