Using multiple IF functions?

Callaghan86

New Member
Joined
Feb 14, 2017
Messages
15
Hi all,

I've created a spreadsheet for work to show job completion dates. I have 3 columns with the following headers:

Job Completion date
Job Deadline date
Overdue?

I want a formula that can show whether a job is still on time or overdue, but also returning text saying "Not yet completed" if a completion date has not been entered, or "No deadline set" if the deadline box is blank. If both date boxes contain a date, then I want the "overdue?" cell to say "On time" or "Overdue"

For example:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Job Completion Date
[/TD]
[TD]Job Deadline Date
[/TD]
[TD]Overdue?
[/TD]
[/TR]
[TR]
[TD]01/02/2017
[/TD]
[TD][/TD]
[TD]No deadline set
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]21/02/2017
[/TD]
[TD]Not yet completed
[/TD]
[/TR]
[TR]
[TD]10/02/2017
[/TD]
[TD]01/02/2017
[/TD]
[TD]Overdue
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the Board!

You want to use a Nested IF, i.e.
Code:
=[COLOR=#0000ff]IF(B2="","No deadline set"[/COLOR],[COLOR=#ff0000]IF(B2 < TODAY(),"Overdue",<today(),"overdue",< font="">[COLOR=#008000]"Not yet completed"[/COLOR]</today(),"overdue",<>[/COLOR]<today(),"overdue",< font="">))

See: https://www.techonthenet.com/excel/formulas/if_nested.php
for more details.</today(),"overdue",<>
 
Last edited:
Upvote 0
Try this:

=IF(B2="","NDS",IF(A2="","NYC",IF(A2>B2,"O","")))

Replace the acronyms with your phrases. There are, of course, other scenarios not accounted for here, but you can nest a couple more.
 
Upvote 0
I think I misunderstood how you want the second example to work.
If that is the case, then AliGW's response will probably be the one you want.
 
Upvote 0
Thank you,

1 more question. What if the deadline expires but no completion date has been entered? I want to say "If TODAY > deadline date AND completion date is blank, then "Overdue"

Thanks,

Chris
 
Upvote 0
I can't help thinking there might be an easier way, but this does seem to work:
Code:
=IF(B2="","No deadline set",IF(AND(A2="",B2 > TODAY()),"Not yet completed",IF(AND(B2 < TODAY(),A2=""),"Overdue",IF(AND(B2 < TODAY(),A2 <> "",A2 > B2),"Overdue",""))))
 
Last edited:
Upvote 0
You are welcome.
Glad to help!:)
 
Upvote 0
Thanks to you guys I have now expanded on it to include more information :)

=IF(C2="","Please set deadline",IF(A2="","No date planned",IF(AND(B2="",TODAY()>C2),"Task is "&TODAY()-C2&" days overdue!",IF(B2="","Not yet completed",IF(AND(C2=TODAY(),B2<>""),"Deadline today! Task already complete",IF(B2<C2,"Task completed on time",IF(AND(C2-TODAY()<30,B2=""),(C2-TODAY())&" days until deadline",IF(AND(B2>C2,B2=""),(C2-B2)&" days overdue",IF(B2>C2,"Task completed "&(B2-C2)&" days late")))))))))
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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