Multi Column Data Validation in Excel Table

TheFrog

New Member
Joined
Aug 4, 2009
Messages
11
Hi Everyone,

I have an Excel table. I am trying to perform a multi-column data validation. I am trying to use the COUNTIFS function like so:
=COUNTIFS([Supplier],C2,[Supplier_Code],D2)<=1

The goal is to ensure that the data entered is not a duplicate. The combination of [Supplier] and [Supplier_Code] is the basis of validation. The Supplier name is provided via data validation drop-down list in Column C, and the Supplier Code is entered (manually) into Column D.

When I use the formula in a calculated cell it works perfectly. When I try to use it as a data validation custom formula I receive an error: 'There's a problem with this formula........ Not trying to type a formula?......'. I have tried to get around this by using a helper column with the Supplier's name in it and applying the validation formula to both columns at the same time - no difference made, same error.

This is seemingly something I am not referencing properly when using the table to reference itself for the validation.

Can anyone steer me in the right direction?

Any help much appreciated.

Cheers

The Frog
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Validation is an old function in Excel. It does not works with references you used.
Give the cells under the colum title a range name.
Use the range name in your validation formula.
 
Upvote 0
Solution
Example: =COUNTIFS(Supplier,$C2,Supplier_code,$D2)<=1
 
Upvote 0
Thanks for the feedback. I appreciate it.

I'll do the old style dynamic named ranges to overlap the table columns.

Cheers

The Frog
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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