If/then question

G

Guest

I have a formula in the cell C27 as follows: =WORKDAY(C18+$B28-1,1,HOLIDAYS)
However, in some instances the date that results in C27 is earlier than the previous task

For example, I have various milestones that precede and follow this step. So, this time C26=3/25/2004 but C27 ends up as 3/23/04 (because C18=3/2/2004 + B28 = 21 days)

How can I re-write this SAME formula (which you were kind enough to provide) to read that IF the sum of c18+b28 return a date earlier than that in C26, then add one day to C26, but keeping the same conditions of workdays and holidays as above

Your help is most appreciated.
 
B

Bob Phillips

Marcy,

Do you mean?

=IF(C18+B28<C26,WORKDAY(C26,1,HOLIDAYS) ,WORKDAY(C18+$B28-1,1,HOLIDAYS) )

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Marcy said:
I have a formula in the cell C27 as follows: =WORKDAY(C18+$B28-1,1,HOLIDAYS)
However, in some instances the date that results in C27 is earlier than the previous task.

For example, I have various milestones that precede and follow this step.
So, this time C26=3/25/2004 but C27 ends up as 3/23/04 (because C18=3/2/2004
+ B28 = 21 days).
How can I re-write this SAME formula (which you were kind enough to
provide) to read that IF the sum of c18+b28 return a date earlier than that
in C26, then add one day to C26, but keeping the same conditions of workdays
and holidays as above.
 
G

Guest

Hi, Bob--

I tried this formula but it doesn't seem to work as I had hoped. That is, when the date in C18 = 3/1/2004 and B28 remains at 21 days (always), and the date in C26 is 3/25/2004, the formula works fine returning a date of 3/26/2004 (in spite of the total being 3/22/2004)...perfect!

BUT, when I change the figure in C18 to 3/10/2004, for example, the result should be 3/30/2004 because it falls LATER than the date in C26 (3/25/2004) but using this formula the date stayed the same as above (3/26/2004).

Where am i going wrong?
 

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

Top