Week End Formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Does anyone have a formula for calculating the week end date. ie if I put in 15/06/04 I need the cell to display the week end date, in this case 26/06/04.

Is this possible??
 
Where's the logic in that unless you meant 19/06/04?
One way

=A1+7-MOD(WEEKDAY(A1),8)

with your date in A1,
if indeed you meant 26/06/04
just add 7

=A1+7-MOD(WEEKDAY(A1),8)+7

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



pjd said:
Hi

Does anyone have a formula for calculating the week end date. ie if I put
in 15/06/04 I need the cell to display the week end date, in this case
26/06/04.
 
Hi

Does anyone have a formula for calculating the week end date. ie if I put in 15/06/04 I need the cell to display the week end date, in this case 26/06/04.

Is this possible??

What is your definition of Weekend?

In your example, 15 June is a Tuesday; and 26 June is two Saturdays hence.

Here in the US we would ordinarily consider the next weekend to be the next
Saturday.

In any event, for the first Saturday after any date:

=A5+7-WEEKDAY(A5)

For the second Saturday:

=A5+14-WEEKDAY(A5)

If the initial date is a Saturday, the first formula will return the same date.
That behavior can be altered if you wish.



--ron
 
Where's the logic in that unless you meant 19/06/04?
One way

=A1+7-MOD(WEEKDAY(A1),8)

with your date in A1,
if indeed you meant 26/06/04
just add 7

=A1+7-MOD(WEEKDAY(A1),8)+7


Peo,

What is the purpose of the MOD function in your formula?

I seem to get the same result using just WEEKDAY(A1).


--ron
 
Back
Top