+ Reply to Thread
Results 1 to 20 of 20

Calculating number of weeks

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Calculating number of weeks

    Dear all,

    would appreciate any help!

    I need to calculate the number of weeks which have passed since a certain day for Project Planning.

    Kindly look into the attached attachment.

    This is urgent and I am quite a novice in Excel!

    Cheers!

    billy
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating number of weeks

    Hi,

    Not sure but try:

    =IF(B4="r",WEEKNUM(TODAY(),2)-WEEKNUM(A4,2)+1)

  3. #3
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    Thanks a million for your quick reply. Just one small request if you can kindly insert thus formal in my attached excel sheet and upload it or mail it to me. I am really a beginner :

  4. #4
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    Would greatly appreciate it!

  5. #5
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating number of weeks

    See the file. Yellow cell has formula.
    Attached Files Attached Files

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating number of weeks

    that will create problems at the end/beginning of the year
    assume today()=03/01/2015
    and a4=25/11/2014
    then you'd get -46
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    THANK A LOT!!!!!!!!!!!!!!! I am not sure if its working..will give it a try now and get back to you!!

  8. #8
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    oops..thanks martindwilson. any tip how to overcome it?

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating number of weeks

    edited
    2 posts see post #11
    Last edited by martindwilson; 10-21-2014 at 06:58 AM.

  10. #10
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating number of weeks

    See if this formula overcomes it:

    =IF(B4="r",IF((YEAR(A4)=YEAR(TODAY()))*(TODAY()>=A4),WEEKNUM(TODAY(),2)-WEEKNUM(A4,2)+1,IF(YEAR(A4)<YEAR(TODAY()),(WEEKNUM(DATE(YEAR(A4),12,31),2)-WEEKNUM(A4,2))+WEEKNUM(TODAY(),2))),"")

    See the file.
    Attached Files Attached Files

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating number of weeks

    depends
    using say
    =IF($B$4="r",(TODAY()-$A$4)/7,"") where a4 =02/08/2014 and today() is 9/1/2015
    then with a decimal value for part week
    =IF($B$4="r",(today()-$A$4)/7,"") = 22.85714286
    you can round that down to 22 with int()
    =IF($B$4="r",INT((today()-$A$4)/7),"") =22
    or up to 23 with roundup()
    =IF($B$4="r",ROUNDUP((today()-$A$4)/7,0),"") =23
    or simply round() to nearest whole week
    =IF($B$4="r",ROUND((today()-$A$4)/7,0),"")
    Last edited by martindwilson; 10-21-2014 at 06:53 AM.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating number of weeks

    hmm how did that all get posted twice!

  13. #13
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    @misrasomendra and martindwilson: Thanks a trillion both of you.

    I guess the latest solution from misrasomendra should work.

    No idea why it got posted twice..though they seems to be slightly different

  14. #14
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating number of weeks

    BIlly Do check my formula on your live data and if it's work that's gr8. Thanks for the feedback.

  15. #15
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    Sure misrasomendra! Will test it now and get back to you. Thanks a lot!!!!

  16. #16
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    Thanks a lot misrasomendra! It works perfectly fine!
    Really appreciate your help!

    And many thanks to you too martin.

    Cheers

    Billy

  17. #17
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Calculating number of weeks

    Glad to help you and thanks for the feedback, You can mark the thread as solved and if you feel the solution helped you, than please click the star of Add reputation below the comments.

  18. #18
    Forum Contributor
    Join Date
    10-04-2014
    Location
    Europe
    MS-Off Ver
    2007
    Posts
    107

    Re: Calculating number of weeks

    Hi
    Have a look at this, in cell C6. It looks like it will solve your problem.

    Hope it helps.

    Regards.
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    10-04-2014
    Location
    Europe
    MS-Off Ver
    2007
    Posts
    107

    Re: Calculating number of weeks

    oops, it looks like it was already solved

  20. #20
    Registered User
    Join Date
    10-21-2014
    Location
    Berlin
    MS-Off Ver
    2012
    Posts
    10

    Re: Calculating number of weeks

    Thanks Bob! It works like i wanted!

    And many thanks to you too misrasomendra, clicked on add reputation star.

    thank you guys and i really appreciate all your help!

    Cheers

    Billy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Calculating the number of weeks
    By Billy29 in forum Excel General
    Replies: 1
    Last Post: 10-21-2014, 06:11 AM
  2. [SOLVED] Calculating difference between times and mutilplying over a number of weeks
    By scokaw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-27-2014, 08:21 PM
  3. [SOLVED] calculating number of weeks in a month ( jan -Dec 13) starting every monday+display
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2013, 10:01 AM
  4. Calculating Averages based upon weeks not include Bye Weeks
    By Kfetterman1 in forum Excel General
    Replies: 2
    Last Post: 09-27-2006, 11:18 AM
  5. Calculating number of weeks from two dates
    By spudgun in forum Excel General
    Replies: 5
    Last Post: 08-03-2005, 07:08 PM

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