+ Reply to Thread
Results 1 to 6 of 6

Today's week number

  1. #1
    Registered User
    Join Date
    08-09-2005
    Posts
    17

    Today's week number

    Hey there,

    I have a sheet with one column, indicating the week number for that row. Is there an easy way to chech whether the week number is exceeded, by comparing to the today's week number (1-52)?

    thanks in advance
    kizzie

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by kizzie
    Hey there,

    I have a sheet with one column, indicating the week number for that row. Is there an easy way to chech whether the week number is exceeded, by comparing to the today's week number (1-52)?

    thanks in advance
    kizzie
    Hi,

    try

    =If(A1>WeekNum(Today()), true , false )

    hth
    ---

    but note, on the first of January it will (again) not be.
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    If you date is in A1, then

    =WEEKNUM(A1,1) 1 being if week starts on Sunday, 2 for Monday

    to get WEEKNUM to this week

    =WEEKNUM(TODAY(),1)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    08-09-2005
    Posts
    17
    Hey

    Does this also work in vba code?

    thanks

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by kizzie
    Hey

    Does this also work in vba code?

    thanks
    Hi,

    the WeekNum is not available as a WorkSheet function, and there may be a suitable code to get the week, but you can always use the formula option from VB, useful for those processes where the Formula is easier than the code,
    Please Login or Register  to view this content.
    should help you.

    hth
    ---

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi kizzie,

    I remember some serious headaches with this issue ...

    A good explanation is provided by Chip ...

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

    HTH
    Carim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1