Help with a conditional formula

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I have two date fields the first is when a Task is Due and the second is when it was completed. I need a formula to show if the task was completed "On Time", "Completed Late", "Past Due" or "In Process"
(note I need to check to see if the field is Null or not. If either is Null then "Null"

Where I am unsure is incorporating todays date into the formula.

[K_PDIR Due Date]
[L_PDIR Completed]

I know these do not have the correct syntax - but I hope it helps explain what I need.
if [K_PDIR Due Date] = null or [L_PDIR Completed]= null then null
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]< or = [K_PDIR Due Date] then "On Time"
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]> [K_PDIR Due Date] then "Completed Late"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] > or =Now() "In Process"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] < or =Now() "Past Due"

Thank you for your help. New to Power Query
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Null is a Null but "Null" is nullable text value
for date of today try Date.From(DateTime.LocalNow())
 
Upvote 0
Thanks. My intentions was not to put the word Null anywhere. I should not have used the quotation marks "" in my post.
 
Upvote 0

Forum statistics

Threads
1,223,743
Messages
6,174,244
Members
452,553
Latest member
red83

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