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

##### New Member
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.

### Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What have you got so far in terms of validating the inputs?

=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

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",""))

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.

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.

Replies
0
Views
379
Replies
2
Views
208
Replies
14
Views
889
Replies
4
Views
635
Replies
2
Views
551

1,219,035
Messages
6,145,905
Members
450,654
Latest member
lorento

### 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.

### Which adblocker are you using?

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

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