Use a set of values to validate cell input

Aguspwc

New Member
Joined
May 5, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi!

I searched a solution for this and didn't find any.
What I want to do is to validate that the cell value in "Input" is included in the "Validation list" column. For example:


Lista.PNG

I can't use a simple data validation with a list because the "List" column is going to be filled using copy & paste, so the validation would be erased.
Is there a way to get this just with formulas? I can't use macros either.

I tried this formula but doesn't work in the way I need.
Excel Formula:
=IF(B2<>D2:D8;"Error";"OK")

I'd appreciate any help on this. Thanks in advance!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Book1.xlsm
ABC
1ResultInputList
2OKAA
3OKFB
4ErrorQC
5OKCD
6OKAE
7OKDF
8Error2G
Sheet2
Cell Formulas
RangeFormula
A2:A8A2=IF(SUMPRODUCT(--($C$2:$C$8=B2))>0,"OK","Error")
 
Upvote 0
Solution
I thought of 2 ways without trying anything else.

Book1
ABCDE
1CheckInputValidCheck
2OKAAOK
3OKFBOK
4ErrorQCError
5OKCDOK
6OKAEOK
7OKDFOK
8Error2GError
Sheet3
Cell Formulas
RangeFormula
A2:A8A2=IF(SUM(--(B2=$D$2:$D$8))>=1,"OK","Error")
E2:E8E2=IF(0=SUMPRODUCT((B2=$D$2:$D$8)*(ROW($2:$8))),"Error","OK")
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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