How do I calculate the friday before a date?

R

Renee

Hello all,

I have been trying to work with the WEEKDAY function, unsuccessfully. I
have a column of dates, I would like to calculate the Friday before the date
please.

Thank you,
Renee
 
M

Miguel Zapico

You can use a formula like:
=DATE(YEAR(A1),MONTH(A1),DAY(A1)-MOD(WEEKDAY(A1)-6,7))

The 6 in the MOD(WEEKDAY(A1)-6,7) is the result of the WEEKDAY function on a
Friday, if you have a different setting change it appropiately.

Hope this helps,
Miguel.
 
R

Renee

Thank you both!

Miguel Zapico said:
You can use a formula like:
=DATE(YEAR(A1),MONTH(A1),DAY(A1)-MOD(WEEKDAY(A1)-6,7))

The 6 in the MOD(WEEKDAY(A1)-6,7) is the result of the WEEKDAY function on a
Friday, if you have a different setting change it appropiately.

Hope this helps,
Miguel.
 
Top