need help with conditional formatting

jfd145

New Member
Joined
Sep 8, 2006
Messages
3
So i have a spreadsheet that has about 22,000 different zip codes. starting at B2 all the way down to B21,989.

What I want to do is type a number in (a zip code), and if it is in the list, then I want a box to come up and say "YES" and if it isn't in the list to say "NO"

I believe i have to use a conditional format. But when i try to do it, nothing shows up in the box.

I know it is possible, I just dont know exactly how to do it. Can anyone give some insight?

thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the board.

If you are entering your Zip code (to be matched against the list) in A1, then A2=IF(ISNUMBER(MATCH(A1,B2:B21989,0)),"YES","NO")
 
Upvote 0
Welcome to the Board!

You can do it with a formula:
Book4
ABCD
1Zip CodesIn ListYES/NO
27610992081YES
392592
492562
592081
692082
Sheet1


Formula is: =IF(ISNA(MATCH(B2,A:A,0)),"NO","YES")

You can then use conditional formatting for the YES/NO result.

Hope that helps,

Smitty
 
Upvote 0
one last question, is there a way to lock all but1 cell? For instance, I want to lock only A2 as in the first example to prevent the formula from being tampered with. But i want to still be able to put info in to cell A1

thanks again
 
Upvote 0
By default all cells are locked, so just select the cell that you want to be editable and goto Format-->Cells-->Protection-->Uncheck "Locked", then goto Tools-->Protection-->Protect Sheet, add a password if you want.

Smitty
 
Upvote 0

Forum statistics

Threads
1,222,408
Messages
6,165,870
Members
451,989
Latest member
DannyBoy1977

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