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

Try something like this:

=TEXT(A13+CHOOSE(WEEKDAY(A13,2),-1,-2,-3,3,2,1,0),"mm/dd/yyy")

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"JR" wrote:

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.