If and then statement needed..

Mrs. T

Board Regular
Joined
May 24, 2007
Messages
107
Office Version
  1. 365
Platform
  1. MacOS
I'm having a heck of a time figuring out a statement....

I need to know:
if cell B4 is a NO, then 0
if cell B4 is a YES and cell C4 is a YES, then 10
if cell b4 is a YES and cell C4 is a NO, then 5

This is what I have, but it's coming up false:
=IF(B5="NO",0,IF(B5="YES",IF(AND(B5="YES",C5="YES"),$L$11,AND(B5="NO",C5="NO"))))

What am I doing wrong?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
How about
=IF(B4="NO",0,IF(AND(B4="YES",C4="YES"),10,IF(AND(B4="YES",C4="NO"),5,"")))
 
Upvote 0
Just another way:

=LOOKUP(B4&C4,{"No","YesNo","YesYes"},{0,5,10})
 
Upvote 0
Or, if those are the only values you can have in B4 and C4:

=(B4="YES")*IF(C4="YES",10,5)
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
Hello (again)

Looking for another if/then/and statement...hoping you guys could help again!

G5 = a person's name
H5 = their lodging choice (there are 3 choices - Junior Sat ($90), Junior Fri & Sat ($120) or Brownie Saturday ($90)

I would like the cell to look at G5 and if there's nothing in there, to be Zero. If there's a name in G5, then I need it to look at the choice it gave in H5 to result in a price.
 
Upvote 0
As this is a totally different question, you will need to start a new thread.
Thanks
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
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