Date Difference Formula

Asouf

New Member
Joined
Jan 28, 2019
Messages
8
After great success in my last post, were I received help with Excel, Im once again seeking the help of 'experts'

I have a work log spreadsheet which I need to extract some performance indicators and then present these as monthly graphs.

The jobs have a 3 working day pass/fail trigger and needs to show working in progress jobs (without a finish date) and if possible, an Error state if the datedifference is a negative or above an arbitrary value, maybe 1000 days+ which would show an inputting error...

A F H I J
Job No Date Start Date Finished DateDiff (working days) Pass/Fail
132 01/04/2019 03/04/2019 2 Pass
189 01/04/2019 -31128 Working in Progress ( How can I remove the -31128 from showing)
245 03/04/2019 23/04/2019 15 Fail
986 01/04/2019 21/04/2029 3650 Date Error -Please Review

Ive tried the following, to begin with but any guidance on a better method is greatly appreciated.
=IF(I37>4,"FAIL",IF(I37<=4,"PASS",IF(I37<=0,"Too Few Days")))

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Re: Date Difference Formula Help Req'd

Hi, perhaps something like this..


Excel 2013/2016
FGHIJ
301/04/201903/04/20192Pass
401/04/2019In progress
503/04/201923/04/201914Fail
601/04/201921/04/20292624Error State
701/04/201901/03/2019-23Error State
Sheet1
Cell Formulas
RangeFormula
I3=IF(H3="","",NETWORKDAYS(F3,H3)-1)
J3=IF(I3="","In progress",IF(OR(I3<0,I3>1000),"Error State",IF(I3<=4,"Pass","Fail")))
 
Last edited:
Upvote 0
Re: Date Difference Formula Help Req'd

AFHIJ
Job NoStartFinishDate DiffPass/Fail
1321/4/193/4/192Pass
1891/4/19-31128Work in Progress
2453/4/1923/4/1915Fail

<tbody>
</tbody>
986 1/4/121/4/293650 Error - Check

<tbody>
</tbody>
 
Upvote 0
Re: Date Difference Formula Help Req'd

Hi. Thanks for the prompt reply, however..

The formula for Column I works ok (its going to be hidden so fact it shows the 30000+ days isnt an issue)

The formula for Column J works showing the working day pass/fail, but shows 'Error State' for jobs shown in Column I as 'In Progress'

Hi, perhaps something like this..

Excel 2013/2016
FGHIJ
301/04/201903/04/20192Pass
401/04/2019In progress
503/04/201923/04/201914Fail
601/04/201921/04/20292624Error State
701/04/201901/03/2019-23Error State

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
I3=IF(H3="","",NETWORKDAYS(F3,H3)-1)
J3=IF(I3="","In progress",IF(OR(I3<0,I3>1000),"Error State",IF(I3<=4,"Pass","Fail")))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Re: Date Difference Formula Help Req'd

The formula for Column J works showing the working day pass/fail, but shows 'Error State' for jobs shown in Column I as 'In Progress'

Let try testing column H directly:

=IF(H3="","In progress",IF(OR(I3<0,I3>1000),"Error State",IF(I3<=4,"Pass","Fail")))
 
Upvote 0
Re: Date Difference Formula Help Req'd

Let try testing column H directly:

=IF(H3="","In progress",IF(OR(I3<0,I3>1000),"Error State",IF(I3<=4,"Pass","Fail")))

Many thanks for this.. This works as intended...

Lastly, is there a way of having these formulas work for Column I and J within 'dragging & dropping' the formula down the entire column. As at present there are only 350 job rows, but this is likely to goto 5000+ by year end and the spreadsheet shows either 0 in Col I for rows 351-5000 and 'In Progress' for rows 351 -5000 even though there is no other data on these rows only the copied formulas..
 
Upvote 0
Re: Date Difference Formula Help Req'd

You could try this:

=IF(F3="","",IF(H3="","In progress",IF(OR(I3<0,I3>1000),"Error State",IF(I3<=4,"Pass","Fail"))))
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,649
Members
449,111
Latest member
ghennedy

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