IF Function

BeckaB

New Member
Joined
Apr 4, 2019
Messages
11
I have a if formula based on 2 cells:

So..

IF
D15 = YES and D17 = BLANK Then return "C2"
IF D4 = YES and D18 = BLANK then return "C2"
If Both D15 and D4 = YES and both D17 and D17 = blank then return "C2"
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Sorry should have added, if the cells are not blank then it needs to do a sum of cells D21 & D22
 
Upvote 0
I have a if formula based on 2 cells:

So..

IF
D15 = YES and D17 = BLANK Then return "C2"
IF D4 = YES and D18 = BLANK then return "C2"
If Both D15 and D4 = YES and both D17 and D17 = blank then return "C2"

result is always C2? does not make sense.
 
Upvote 0
What if D15 = YES and D18 = BLANK? or D4=YES and D17=BLANK?
 
Upvote 0
IF D15 = Yes and D17 = Blank then "Enter Cost 1"
IF D15 = No and D17 = Blank then sum of D21 & D22
IF D4 = Yes and D18 = Blank then "Enter Cost 2"
IF D4 = No and D18 = Blank then sum of D21 & D22

If both D15 and D4 = Yes and both D17 and D18 are blank then "Enter cost 1 & 2"
 
Upvote 0
I have this for the first part which works I just need to add in the second part

=IFERROR(IF(AND(D15="Yes",D17=""),"Cost1",IF(SUM(D6-D22)<=0,"£0.00",SUM(D6-D22))),"")
 
Upvote 0
Are these the outcomes you want?

D15D17
YesBlank="Enter cost 1"
YesNot blank=Sum D21&D22
NoBlank=Sum D21&D22
NoNot Blank=Sum D21&D22
D4D18
YesBlank="Enter cost 2"
YesNot blank=Sum D21&D22
NoBlank=Sum D21&D22
NoNot Blank=Sum D21&D22
D15D4D17D18
YesYesBlankBlank="Enter cost 1 & 2"
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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