IF statements using multiple conditions

Lbender

New Member
Joined
Apr 18, 2019
Messages
5
[TABLE="width: 100"]
<tbody>[TR]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]Target
[/TD]
[TD]Status (Days)
[/TD]
[TD]Actual
[/TD]
[/TR]
[TR]
[TD]3/15/2019
[/TD]
[TD]33
[/TD]
[TD]4/17/2019
[/TD]
[/TR]
[TR]
[TD]4/1/2019
[/TD]
[TD]FALSE
[/TD]
[TD]3/22/2019
[/TD]
[/TR]
[TR]
[TD]4/18/2019
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to calculate a field using IF statements, but I have 3 or 4 separate situations that I need calculations for.
Here is the function I'm using:
=IF(G6>=E6, TODAY()-E6), IF(G6<=E6, DATEDIF(E6,G6,"d")) but can't figure out how to work

My calc cells are above
Basically I need it to calculate the Past Due #of days if the Actual is after the target,
if the actual falls before the target then count the #of days ahead of schedule
if the actual is empty then say something like "In Progress"
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi & welcome to MrExcel
How about
=IF(G6="","In Progress",IF(G6>=E6, TODAY()-E6, IF(G6<=E6, E6-G6)))
 
Last edited:
Upvote 0
Doesn't work, when my actual completion date is sooner, it's showing positive difference like it's past due (maybe day difference, not today function) . I would prefer this option to show - (negative). Then is it possible to populate the results in color?
 
Upvote 0
In that case how about
=IF(G6="","In Progress",IF(G6>=E6, TODAY()-E6, IF(G6<=E6, G6-E6)))
 
Upvote 0
That did it! Now, maybe too much, but is there a way for it to auto populate color per result? Ie- positive values= red, Neg= green, In Progress=yellow?
 
Upvote 0
Not with a normal formula, you would need to use Conditional formatting for that.
 
Upvote 0
Is there a tutorial on how to do that in conditional formatting? I've never messed with that before
 
Upvote 0

Forum statistics

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