Greater than 5 days formula

G

Guest

I would like help with a formula for the following:

If A1 is more than 5 working days greater than B1 = 'Failed'
If A1 is equal to or less than 5 working days greater than B1 = 'Passed'

Many thanks.

Rachael
 
G

Guest

Use the WORKDAY function in your If statement. It is in the Analysis
Toolpack addin if it isn't in your Excel already.

Hope that helps.
 
G

Guest

=if(networKdays(B1,A1,holiday_range_if _wanted)>5,"Failed","Passed")
you have to have the analysis toolpac added for this to work.
the holiday range is optional. Check help for more info.
 
G

Guest

Thanks bj.

Leading on from my original question, how can the formula
'=if(networKdays(B1,A1,holiday_range_if _wanted)>5,"Failed","Passed")' be
changed to incorporate the following:

if A1 is blank, base the calculation on C1 instead
 
G

Guest

=if(A1="",if(networKdays(B1,C1,holiday_range_if
_wanted)>5,"Failed","Passed"),if(networKdays(B1,A1,holiday_range_if
_wanted)>5,"Failed","Passed"))

would be one option
 
G

Guest

Spot on, bj. Thanks very much.

Whilst I'm on a roll....how can I change the formula to also include the
following:

If there is a date in C1, compare it with A1.
If A1 & C1 are equal = 'Passed'
If A1 is greater than C1 = 'Failed'

Many thanks for your help.

Rachael
 
G

Guest

The priority of the comparisons becomes important
Assuming the earlier equation is only needed if either C1 or A1 is not
entered of if C1 is greater than A1
This assumes that at least one of A1, C1 is a date

=if(and(isnumber(C1),isnumber(A1),C1>A1),if(A1>C1,"Failed","Passed"),if(A1="",if(networKdays(B1,C1,holiday_range)>5,"Failed","Passed"),if(networKdays(B1,A1,holiday_range)>5,"Failed","Passed")))
 
G

Guest

Hi

If there is a date in C1 then it should only be compared to A1 (There will
always be a date in A1).
If A1 is greater than C1, it should 'Fail'. If A1 is equal to C1, it should
'Pass' (There will never be an earlier date).

If there is no date (blank) in C1, then B1 should be compared to A1 (There
will always be a date in A1 & B1).
If A1 is more than 5 working days greater than B1, it should 'Fail'. If it
is 5 days or less, it should 'Pass'.

Hope that helps.

Many thanks.

Rachael
 
G

Guest

=if(C1<>"",if(C1=A1,"Pass","Fail"),if(networKdays(B1,A1,holiday_range_if_wanted)>5,"Failed","Passed"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Need Countifs Formula Help 0
conditional formula 2
Variance Analysis and Excel 1
if and Problem 0
Excel Formula and Variance Analysis 0
Formula 1
Greater Than formula 5
If, greater than 4

Top