View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daniel.M
 
Posts: n/a
Default Help with looking the nearest Sunday

Hi,

For nearest Friday, you can use:
=A1+4-WEEKDAY(A1+5)

Also, for nearest Sunday
=A1+4-WEEKDAY(A1+3)

and format the cells as a date

Regards,

Daniel M.

"JR" wrote in message
...
Hi,

I currently use this formula to populate teh nearest Friday to today:

=TEXT(A13+LOOKUP(WEEKDAY(A13),{1,2,3,4,5,6,7},{-2,-3,3,2,1,0,-1}),"mm/dd/yyyy")

How do I change the formula so that it will caluclate the nearest Sunday?

Thanks for the help.