Nested IF formulas

epyzdrh

New Member
Joined
Jul 30, 2008
Messages
43
Office Version
  1. 365
Platform
  1. Windows
I have the three conditions below that can be met,

Formula 1 =SUM(IF((F:F>0)*(I:I>0),K:K))
Formula 2 =SUM(IF((F:F>0)*(I:I=0),K:K))
Formula 3 =SUM(IF((F:F=0)*(I:I=0),K:K))

and what I would like to achieve is to have these in one cell but if Formula 1 is met the cell equals 1, if formula 2 is met the cell equals 0 and if Formula 3 is met the cell equals -1. Doesn't feel like I'm far away from the answer but I can't quite see it yet?

Dave
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I didn't understood from your formula what exactly you meant but try this:

=IF(1st condition,TRUE,IF(2nd condition,TRUE,IF(3rd condition,TRUE,FALSE)))
 
Upvote 0
Code:
=sum(if((f:f>0)*(i:i>0),1,sum(if((f:f>0)*(i:i=0),0,sum(if((f:f=0)*(i:i=0),-1))))))
 
Upvote 0
I have the three conditions below that can be met,

Formula 1 =SUM(IF((F:F>0)*(I:I>0),K:K))
Formula 2 =SUM(IF((F:F>0)*(I:I=0),K:K))
Formula 3 =SUM(IF((F:F=0)*(I:I=0),K:K))

and what I would like to achieve is to have these in one cell but if Formula 1 is met the cell equals 1, if formula 2 is met the cell equals 0 and if Formula 3 is met the cell equals -1. Doesn't feel like I'm far away from the answer but I can't quite see it yet?

Dave
You intent is not very clear... If you want to coalesce them into a single formula:

Either: Control+shift+enter..
Code:
=SUM(
    IF(ISNUMBER($F$2:$F$100),
    IF($F$2:$F$100>=0,
    IF(ISNUMBER($I$2:$I$100),
    IF($I$2:$I$100>=0,
      $K$2:$K$100)))))

Or, just enter...
Code:
=SUMIFS($K$2:$K$100,$F$2:$F$100,">=0",$I$2:$I$100,">=0")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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