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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Do you mean something like below?
Book1
ABCDEF
1Column1 (unique values)Column2 (consolidated inputs)
2AA0
3BB0
4CA0
5B0
6A0
7B0
8C0
9D1
Sheet1
Cell Formulas
RangeFormula
F2:F9F2=1*NOT(ISNUMBER(XMATCH(E2:E9,A2:A4)))
Dynamic array formulas.
 
Upvote 0
Something like that, but I need to have all the values of column F in a single cell. Is that possible?
 
Upvote 0
Wrap it inside a sum function. You won't know which one is missing like this.
Book1
ABCDEFGH
1Column1 (unique values)Column2 (consolidated inputs)
2AA1
3BB
4CA
5B
6A
7B
8C
9D
Sheet1
Cell Formulas
RangeFormula
F2F2=SUM(1*NOT(ISNUMBER(XMATCH(E2:E9,A2:A4))))
 
Upvote 0
Another option
+Fluff 1.xlsm
ABC
1Column1 (unique values)Column2 (consolidated inputs)
2AA1
3BB
4CA
5B
6A
7B
8C
9D
10
Lists
Cell Formulas
RangeFormula
C2C2=COUNT(FILTER(ROW(B2:B9),ISNA(MATCH(B2:B9,A2:A4,0))))
 
Upvote 0
Hello all,

many thanks for your replies. All option works for me well.

Regarding this point "You won't know which one is missing like this." it's fine for me. I want a value different from zero and set up conditional formatting to display the text "Please review your inputs" which is originally white.

Just one more point please, is it somehow possible to omit blank cells? I extended the range in column1 with one more blank cell, but if the range in column2 has some blank cells, they are counted as different compared to column1. I hope you understand what I mean. If not, I will try to rearrange my question :)

Thank you
 
Upvote 0
How about
+Fluff 1.xlsm
ABC
1Column1 (unique values)Column2 (consolidated inputs)
2AA1
3BB
4CA
5B
6A
7B
8C
9D
10
11
12
Main
Cell Formulas
RangeFormula
C2C2=COUNT(FILTER(ROW(B2:B20),(B2:B20<>"")*(ISNA(MATCH(B2:B20,A2:A10,0)))))
 
Upvote 0
And hopefully last question. Is it somehow possible to adjust the formula to work also in a case in which column2 can contain various values which can't be defined by a list? In my case, the correctly entered value starts with FIN001-, so if there is something different (e.g. FIN002) it will display a different value from zero? I tried to use in column1 value "FIN001*", but it doesn't work.
 
Upvote 0

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

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