Data Validation

Ron512

Board Regular
Joined
Nov 17, 2002
Messages
98
I have data validation set so a value can be entered in only one of the two cells. The custom formula is: =COUNTA($H$6, $H$7) < 2

How can I change the validation so a formula can be entered in both cells but still show a validation error if the formulas produce a value in both cells?

Thanks

ron
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
A formula always yields a value even if it might look like the cell is empty.

One way to deal with this is to incorporate the validation into a 'downstream' step. For an example, see
Validate Mandatory Data
http://www.tushar-mehta.com/excel/newsgroups/validate_data/index.html


I have data validation set so a value can be entered in only one of the two cells. The custom formula is: =COUNTA($H$6, $H$7) < 2

How can I change the validation so a formula can be entered in both cells but still show a validation error if the formulas produce a value in both cells?

Thanks

ron
 
Upvote 0
Tushar,

That’s an Interesting example but I’m having trouble applying it to my situation.

Ron
 
Upvote 0
Suppose you want data in only one of B2 or C2. Then, in D2, enter the formula =IF(B2="",C2,IF(C2="",B2,"Oops!"))

Of course, it would be even nicer if you were using D2 in further calculations since the string "Oops!" should generate other equally obvious errors.

Tushar,

That’s an Interesting example but I’m having trouble applying it to my situation.

Ron
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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