ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Weeknumber of calendar date? (https://www.excelbanter.com/excel-programming/348443-weeknumber-calendar-date.html)

NorTor[_4_]

Weeknumber of calendar date?
 
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

chijanzen

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


Carim[_3_]

Weeknumber of calendar date?
 
Hello Tor

You will find a very comprehensive analysis at

http://www.cpearson.com/excel/weeknum.htm

HTH

Cheers
Carim


Ron de Bruin

Weeknumber of calendar date?
 
Hi

Carim already posted the link to Chip's site but
I have more information on my site about the ISO week function
http://www.rondebruin.nl/weeknumber.htm
And
http://www.rondebruin.nl/isodate.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"NorTor" wrote in message ...
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





All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com