If statment to not allow 2 fields to be filled at the same time

ademello

New Member
Joined
Mar 22, 2009
Messages
4
I have a form that i want to be filled out this is how part of it looks

Bid Bond (% or $) _______% $________ YES NO

and there is a seperate tab with an form that allows one party to enter a value for either the % or the $....so i want the person to be able to enter the % or the $ and if the value is correct it will output the YES and if its wrong it will output NO, my problem is how to make it output NO if both are filled in at the same time.
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
What have you got so far in terms of validating the inputs?
 

ademello

New Member
Joined
Mar 22, 2009
Messages
4
=IF(OR(B26='Architect Input'!B11,C26='Architect Input'!B13),"Yes"," ")
thats for the yes field

=IF(AND(B26=0,C26='Architect Input'!B13,B26='Architect Input'!B11,C26=0),"No","")
thats for the no field

all the values are 0 and its outputting Yes and No
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
The no formula
=IF(OR(AND(B26<>"",C26<>""),AND(B26="",C26=""),NOT(IF(B26=0,C26='Architect Input'!B13,B26='Architect Input'!B11))),"No","")

The yes formula
=IF(E26="No","",IF(IF(B26=0,C26='Architect Input'!B13,B26='Architect Input'!B11),"Yes",""))
 

ademello

New Member
Joined
Mar 22, 2009
Messages
4
Thank you so much, the No formula works perfect but no matter what numbers i input into the other fields the Yes never comes up.

Is there anyway i can send u my sheet?

thanks again.
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
The no formula goes into cell E26. If it doesn't, you have to adjust the yes formula to correctly refer to the cell with the no formula. Adjust the reference to E26.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,057
Messages
5,628,359
Members
416,314
Latest member
Dan99321

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
Top