View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Round dates to weekdays

On Wed, 21 May 2008 13:12:00 -0700, Nan wrote:

Is there a way that Excel can recognize if a date is a weekend and round it
to the nearest weekday?


One way is to use a formula (with your date in A1):

=A1-(WEEKDAY(A1)=7)+(WEEKDAY(A1)=1)
--ron