Thread: rounding dates
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default rounding dates

One thought ..

Assuming source dates (real dates) running in A1 down
Put in B1:
=IF(A1="","",IF(WEEKDAY(A1,2)=1,A1,IF(ISNA(MATCH(W EEKDAY(A1,2),{2;3;4},0)),A1+VLOOKUP(WEEKDAY(A1,2), {5,3;6,2;7,1},2,0),A1+VLOOKUP(WEEKDAY(A1,2),{2,-1;3,-2;4,-3},2,0))))
Copy down as far as required. The expression "rounds down" Tues-Thurs to Mon
& "rounds up" Fri-Sun to the next Mon.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ellebelle" wrote:
If would like a function that rounds a date to the nearest Monday. Is there
such a function?

Ellen