Comparing a number against a list of numbers

seadog101

New Member
Joined
Nov 9, 2015
Messages
6
Hi,

I have a workbook that tracks pieces of equipment, part of the data is the serial number of each piece of equipment.

One of the sheets in the workbook is a compiled list of all the serial numbers of the equipment we think we have.

What I want is some way of highlighting to someone who is filling in data about these bits of equipment, that a serial number they have just input is not on the compiled list.

If I use the data validation 'list' option that stops people inputting a serial number that isn't on the compiled list. I still want them to be able to input the 'wrong' serial number, just have the cell highlighted, or a formula in an adjacent cell which then shows a 'correct' or 'incorrect' serial number message.

What's a neat and tidy way of doing this?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You could turn the list you have in a drop down then they can only pick those serial numbers
 
Upvote 0
How about conditional formatting, the list in column F would be on another sheet:
Book1
ABCDEF
1Inventory listInventory we think we have
210
310
410
510
610
712
810
910
1010
1110
122
132
142
152
161
171
181
191
201
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A20Expression=COUNTIF($F:$F,A2)>0textNO
 
Upvote 0
How about conditional formatting, the list in column F would be on another sheet:
Book1
ABCDEF
1Inventory listInventory we think we have
210
310
410
510
610
712
810
910
1010
1110
122
132
142
152
161
171
181
191
201
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A20Expression=COUNTIF($F:$F,A2)>0textNO
Thanks @Georgiboy, that's exactly what I would like to happen. I'll give it a go and report back.
Seadog.
 
Upvote 0
You could turn the list you have in a drop down then they can only pick those serial numbers
Unfortunately, they need to be able to input a 'wrong' number not on the list, as some equipment isn't on the compiled list, or they may simply typed in error.

Once they know the serial number is wrong they need to investigate why we have the item that isn't on our compiled list.
 
Upvote 0
What I want is some way of highlighting to someone who is filling in data about these bits of equipment, that a serial number they have just input is not on the compiled list.

If I use the data validation 'list' option that stops people inputting a serial number that isn't on the compiled list. I still want them to be able to input the 'wrong' serial number
I think that you can do both (allow them other entries and warn them if not on the list) with Data Validation.

Here is my sheet with Data Validation (List) set up in D1 for serial numbers of 1, 2, 3 and 4

seadog101.xlsm
BCD
1SN
21
32
43
54
Sheet1
Cells with Data Validation
CellAllowCriteria
D1List=$B$2:$B$5


But in the Data Validation dialog go to the Error Alert tab and set it up like this.

1683254233978.png


Now I can enter a serial number not on the list and get this warning - with choices of how to proceed.

1683254455757.png


You may wish to also add Conditional Formatting as suggested by @Georgiboy so that the entry remains highlighted if the user chooses 'Yes' in the above dialog.
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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