IF Function

BeckaB

New Member
Joined
Apr 4, 2019
Messages
8
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"
 

BeckaB

New Member
Joined
Apr 4, 2019
Messages
8
Sorry should have added, if the cells are not blank then it needs to do a sum of cells D21 & D22
 

KOKOSEK

Board Regular
Joined
Apr 8, 2019
Messages
201
Office Version
365, 2013
Platform
Windows
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.
 

BeckaB

New Member
Joined
Apr 4, 2019
Messages
8
result is always C2? does not make sense.
The result is different depending on the cell.

So if D17 is blank = "Enter Cost1"
If D18 is blank = "Enter cost2"

If both are blank "Enter Cost 1 and Cost2"
 

KOKOSEK

Board Regular
Joined
Apr 8, 2019
Messages
201
Office Version
365, 2013
Platform
Windows
What if D15 = YES and D18 = BLANK? or D4=YES and D17=BLANK?
 

BeckaB

New Member
Joined
Apr 4, 2019
Messages
8
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"
 

BeckaB

New Member
Joined
Apr 4, 2019
Messages
8
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))),"")
 

KlaasE

New Member
Joined
Nov 4, 2019
Messages
35
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"
 

Forum statistics

Threads
1,081,749
Messages
5,361,064
Members
400,611
Latest member
ThebigG

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top