Week ending calculation

M

Michelle

I am working in a sheet where I have a date and I am trying to find the
Friday post date. I am using
=DATE(YEAR(E2),MONTH(E2),DAY(E2)-WEEKDAY(E2)+6)

It works for everyday unless the day is a Saturday. I've tried several other
formulas (found on the discussion board) and get basically the same results.

Michelle
 
G

Glenn

Michelle said:
I am working in a sheet where I have a date and I am trying to find the
Friday post date. I am using
=DATE(YEAR(E2),MONTH(E2),DAY(E2)-WEEKDAY(E2)+6)

It works for everyday unless the day is a Saturday. I've tried several other
formulas (found on the discussion board) and get basically the same results.

Michelle


Actually, your formula works fine, but can be simplified to this:

=E2-WEEKDAY(E2)+6

Make sure to format the result cell as date.
 
G

Glenn

Glenn said:
Actually, your formula works fine, but can be simplified to this:

=E2-WEEKDAY(E2)+6

Make sure to format the result cell as date.


If that's not right, give an example that demonstrates how this doesn't work,
and what result you want.
 
S

Sean Timmons

=IF(WEEKDAY(E2)=7,DATE(YEAR(E2),MONTH(E2),DAY(E2)+6),
DATE(YEAR(E2),MONTH(E2),DAY(E2)-WEEKDAY(E2)+6))
 
R

ryguy7272

Not sure what you want? The Friday for the current week?
=TODAY()-WEEKDAY(TODAY()-6)+7
=TODAY()+6-MOD(WEEKDAY(TODAY())+7,7)

HTH,
Ryan--
 
R

Ron Rosenfeld

I am working in a sheet where I have a date and I am trying to find the
Friday post date. I am using
=DATE(YEAR(E2),MONTH(E2),DAY(E2)-WEEKDAY(E2)+6)

It works for everyday unless the day is a Saturday. I've tried several other
formulas (found on the discussion board) and get basically the same results.

Michelle

=A1+7-WEEKDAY(A1+1)

Will return the next Friday of any date in A1; unless the date is a Friday, in
which case it will return the same date.
--ron
 

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