Nested If statements using IFS()

iosiflupis

New Member
Joined
Jan 26, 2022
Messages
39
Office Version
  1. 365
Platform
  1. Windows
I am working on a table with arrivals and departures for airlines at my airport. I have two columns, a time column (HH:MM) and a delay column. I want to annotate in a third column whether the airline departed early, late, on time, or was canceled.

I can get the early, late and on-time ifs statement to work. But the canceled portion is giving me fits.
Screenshot 2022-07-27 154353.png


So far I have: =IFS([@[Dep Delay (minutes)]]<0,"Early",[@[Dep Delay (minutes)]]=0,"On-Time",[@[Dep Delay (minutes)]]>0,"Late"), which works beautifully.
and then I have =IF([@[Actual Dep Time]]+[@[Dep Delay (minutes)]]=0,"Canceled",) which also works beautifully,
But when I try to combine the two it does not work. What have I done wrong?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Maybe
Excel Formula:
=IFS([@[Dep Delay (minutes)]]<0,"Early",[@[Dep Delay (minutes)]]=0,"On-Time",[@[Dep Delay (minutes)]]>0,"Late",[@[Actual Dep Time]]+[@[Dep Delay (minutes)]]=0,"Canceled")
or just
Excel Formula:
=IFS([@[Dep Delay (minutes)]]<0,"Early",[@[Dep Delay (minutes)]]=0,"On-Time",[@[Dep Delay (minutes)]]>0,"Late",True,"Canceled")
 
Upvote 0
Solution
@Fluff, Thank you. Actually, I went back into the Power Query and used a conditional column with the four arguments, I just had to arrange them in the proper order so that the canceled statement was before the on-time statement.
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,112
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