#Value! error on if/or statement

PTori82

Board Regular
Joined
Dec 5, 2012
Messages
64
I'm looking for cell R4 to enter a "1" if cell B4= either "PF/C", "SG/SF" or "PG/SF". Here is the formula I used. Keep getting the #Value ! error. I need this to be a 1 or 0 so that I can run this as part of solver. Thank you!

=IF(OR(B4="PF/C",B4="SG/SF",B4="PG/SF"),1*O4)

I then changed it to IFERROR(OR(B4="PF/C",B4="SG/SF",B4="PG/SF"),1*O4) to try to get rid of it but cell R4 now just says either true of false.
 
Last edited:
If it is true or false, I need it say 0. Sp for now, I need the cell to either show a 0, if true, or nothing at all.

So let's clarify, based on what you said, in Red, show 0, whether it's TRUE or FALSE ?

Or, in Blue, show 0 if TRUE, and Blank if FALSE ?

Please confirm which.
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Then use this:

=IF(OR(B4={"PF/C","SG/SF","PG/SF"}),0,"")
 
Upvote 0
Glad it worked for you, you're welcome.
 
Upvote 0

Forum statistics

Threads
1,225,371
Messages
6,184,581
Members
453,244
Latest member
Todd Luet

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