Help with "OR" in data validation

e_nnm_m

New Member
Joined
Oct 9, 2019
Messages
22
I am running Excel 365. I have two named tables, one is called "Inquiry" and the second is called "JO." This is a customer service type database, where first we get an Inquiry, which we log in the Inquiry table in the column named "Inquiry Number." At some point, a decision is made on what to do with this inquiry. If it goes to the JO group, then the data entry person goes to the JO group and enters the inquiry number into the column named "InquiryNum." Now the project is tracked by this group.

Anyway, in the JO spreadsheet, I want to make sure that there are no duplicates. So I made a data validation statement:
'=COUNTIF(INDIRECT("JOLog[InquiryNum]"),INDIRECT("JOLog[@InquiryNum]"))<=2

This works!

Next, I want to make sure that there is indeed a valid inquiry number on the Inquiry sheet. So I made a validation statement:
'=COUNTIF(INDIRECT("InquiryLog[Inquiry Number]"),INDIRECT("JOLog[@InquiryNum]"))>0

This works too!

The problem is, I cannot figure out how to combine them in an "OR" statement. Can you help?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
does this work:

Excel Formula:
=OR(COUNTIF(INDIRECT("JOLog[InquiryNum]"),INDIRECT("JOLog[@InquiryNum]"))<=2, COUNTIF(INDIRECT("InquiryLog[Inquiry Number]"),INDIRECT("JOLog[@InquiryNum]"))>0)
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,115
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