Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Weeknumber of calendar date?

Hello Tor

You will find a very comprehensive analysis at

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

HTH

Cheers
Carim

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Earliest date using WEEKNUMBER Jock Excel Worksheet Functions 3 September 17th 07 10:17 AM
convert date (YYYYMMDD) to weeknumber mark paul Excel Worksheet Functions 1 February 27th 07 12:05 PM
Calculate a date based on a weeknumber brian martens Excel Discussion (Misc queries) 2 January 22nd 07 09:47 PM
Calculate a date based on a weeknumber brian martens Excel Worksheet Functions 2 January 22nd 07 09:47 PM
Change In Date Format to weeknumber automatically Rajesh Sharma Excel Programming 1 October 15th 03 01:05 PM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"