Results 1 to 6 of 6

Thread: WeekNum error

  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi, I'm using the following formula in excel 2002 but get a ?Name error.

    =WEEKNUM(TODAY())

    I'm not sure what is wrong. I originally tried it as

    =WEEKNUM(G1)

    in order to get the week number for a specific date but that gave me the same error.

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Hi Leesha,

    In order to use the WEEKNUM function, you must activate the Analysis ToolPak add-in:
    - Select Tools | Add-Ins...
    - Tick the check box for Analysis ToolPak.
    - Click OK.

    If you distribute the workbook to other users, they will have to do the same (unless they use Excel 2007 or later; Analysis ToolPak is built into Excel itself there).

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    The WEEKNUM function requires the Analysis Toolpak add-in to be loaded.Choose Tools/Add-ins from the Excel menu and put a check mark beside the entry called Analysis Toolpak (not Analysis Toolpak - VBA). If you don't see this entry you'll need to install it using your original installation disks.
    Jerry

  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thank you so much! I found the actual WeekNum forumla while doing a search of the lounge and couldn't for the life of me figure out why it wasn't working. You saved me many hours, as always.

    Thanks!
    Leesha

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Leesha,

    Note that the WEEKNUM function is wrong for ISO week numbers. If you're in the US you're fine.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in Europe You can use (Date in A1)

    =TRUNC((A1-DATE(YEAR(A1+3-MOD(A1-2;7));1;MOD(A1-2;7)-9))/7)

    regards,
    stef

Posting Permissions

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