Thread: Dating Problem
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mangesh Yadav[_4_] Mangesh Yadav[_4_] is offline
external usenet poster
 
Posts: 101
Default Dating Problem

A worksheet function:

=A1-(WEEKDAY(A1)-2)-IF((WEEKDAY(A1)-2)<0,7,0)

Mangesh



"Gary's Student" wrote in message
...
I need a UDF that, given a date, returns the date of the Monday of that

week.
For example, if the input was a value between 6/20/2005 and 6/26/2005,

the
function would return 6/20/2005. If the input was 6/27/2005 the UDF

should
return 6/27/2005.

All I can think of is a massive VLOOKUP table. There has got to be a
cleaner way.

Thank you in advance

--
Gary's Student