View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
chijanzen chijanzen is offline
external usenet poster
 
Posts: 139
Default Weeknumber of calendar date?

NorTor:

try

MsgBox CInt(Format(Date, "ww"))

'Date:your date

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"NorTor" wrote:

Hello,


I need to insert a temperature to a sheet, based on a table stating
expected temperatur on a given week number.

Problem is, I now only have exact calendar days for the comparison, so
I need to find a way using VBA to calculate the week number for a
future calendar date (eg 15th October 2008 - what week number of the
year is this?).

I have still not found a way to do this - help very much appreciated.


Regards,
Tor O
Aalesund, Norway