validate list

david brown

New Member
Joined
Dec 15, 2002
Messages
19
i have a list of numbers, which should all be one of 12 possible "codes".
What is the easy way to check that the numbers are correct and highlight any that are incorrect entries.

I could use a large if function, =if(a1="123456", if(a1="7891011"........,"ok", "false")...... but this seams very clumbersome.
is there a way to use =IF( A1= any value of this array,"true","Fales"


any help apreciated.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try: Data -> Validation

Then in 'Validation Criteria', select Allow list. In the source box, either refer to some cells containing your numbers or type in the list, separated with commas.

HTH
 
Upvote 0
thanks, but the problem is i have already got a list of several thousand numbers( codes ) from another source and need to validate this list to identify any incorrect values.
 
Upvote 0
You can put the list in a separate area and refer to it via a Match() formula


for example: =If(isnumber(match(A1,$X$1:$X$100,0)),"Match Found","No Matches") where X1:X100 contains the list to match up against

this could be copied down and also could be amended to use in a conditional format statement..... like so =Isnumber(Match(A1,$X$1:$X$100,0))
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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