Production Days Late/Early

Offroadracer_814

New Member
Joined
Aug 7, 2015
Messages
24
Assistance needed please. I am working of a formula that is not really working for my needs. I am trying to find out how many days late or early our production equipment is.

Column A is the days late or early. (I have days late formatted to bold red text and highlighted.)
Column B is our planned completion date.
Column C is reality. Or actual production date.

In Row 2 is the formula I use. Is there a better formula? I am not confident in it.

Thanks
 

Attachments

  • Mr. Excel.jpg
    Mr. Excel.jpg
    83.7 KB · Views: 7

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi @Offroadracer_814 ,

I'd recommend using the forums Excel Add-in to make it easier to share your sample data for others to help you.

However, I think the following will help you achieve your desired results:
  • Difference v1 is using the basic NETWORKDAYS formula. However, it's including the Planned date in the total.
  • Difference v2 is using the Holiday portion of the formula to exclude the Planned date from the total.
  • Difference v3 is just using v3 and joining the total with some string values for: Early and Late.
I would avoid v3 as sorting/filtering in place may be problematic. Plus, if you are using those values in a report, it will be harder to extract or FILTER from.

I think v2 & Status would be the most helpful. The Status column will help make it easier to Sort/Filter instead of a Number Range in the Difference column.

VBA Testing.xlsm
ABCDEF
1PlannedCompletedDifference v1Difference v2StatusDifference v3
22024-08-022024-07-2665LateLate -5
32024-07-242024-07-2732EarlyEarly 2
42024-07-272024-07-2700OntimeOntime
NETWORKDAYS
Cell Formulas
RangeFormula
C2:C4C2=NETWORKDAYS([@Planned],[@Completed])
D2:D4D2=NETWORKDAYS([@Planned],[@Completed],[Planned])
E2:E4E2=LET( n, NETWORKDAYS([@Planned],[@Completed],[Planned]), IF(n=0,"Ontime",IF(n<0,"Late","Early")))
F2:F4F2=LET( n, NETWORKDAYS([@Planned],[@Completed],[Planned]), IF(n=0,"Ontime",IF(n<0,"Late " & n,"Early " & n)))

To display negative numbers in red, just format the Column with Number Formatting, 0 decimals and select the second one in the list.

FormatNegativeNumbers.jpg
 
Last edited:
Upvote 0
To display negative numbers in red, just format the Column with Number Formatting, 0 decimals and select the second one in the list.
Or just stick with -1234 so reports and printing isn't a problem. If you still want red negative numbers, then I presume you're currently using Conditional Formatting: Highlight Cells Less Than 0
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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