PDA

View Full Version : Solved: make sure 2 values always equal



thole
05-09-2009, 12:13 PM
I have a worksheet with manufacturer's part number in 1 column, and an internal part number I randomly assign in another column (all input manually). At the end of the worksheet, I want to make sure that all manufacturer's part numbers and the randomly assigned internal part number coincide; for ex:

Manuf Part No. My Part No.
BW1230 AA01
AW5656 AA02
BW1230 AA01
AW8888 AA02 <-- this is an error: point it out

I have tried so many things it's not even funny. I'm all out of ideas (& of my depth....)

mdmackillop
05-09-2009, 12:25 PM
Do Manu. Parts repeat in the column? Why do you assign random numbers, rather than systematic?

lucas
05-10-2009, 08:51 AM
What about a formula in column B that looks up the relationship on a hidden sheet? It is not hidden in the example but can be after you get all of your relationships in place. The formula was only dragged down in the hightlighted cells of column B. Just fill in the rest of the manufacturer numbers and your unique numbers on the hidden sheet.

This way you don't even have to type in the unique numbers, let alone worry about whether they are right or not.

A useful trick I learned from Bob(XLD)

see attachment.

thole
05-12-2009, 07:08 AM
Thanks for the tip, but the internal part numbers are assigned as the spreadsheet is being built. They are not random, but rather sequential.
Any thoughts?
User forms, maybe?

lucas
05-12-2009, 07:34 AM
so each time you add a new part and a new internal number you add it to the hiddensheet.....doesn't have to be hidden. When you type in mfg numbers in column A the internal part number is automatically added to column B.

If when adding mfg numbers to column A you suddenly get a 0 in column B then you know you need to add a new internal number to the hidden sheet.

mikerickson
05-12-2009, 05:47 PM
Try using Conditional Formatting

=(COUNTIF(A:A,A1)=COUNTIF(B:B,B1))

thole
05-13-2009, 06:20 AM
Thank you very much gentlemen! I know know what to do!