Closed Thread
Results 1 to 11 of 11

Excel-formula required to calculate number of days remaining

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Excel-formula required to calculate number of days remaining

    Hi,
    A1, B1, C1 and D4 are cell in Excel worksheet and values are 2, 4 and 6 in A1, b1 and c1 respectively.


    A1 B1 C1 D4
    2 4 6 C1-Formula is: =sum(A1+B1)

    Now I have to write formula for D4-cell:
    i.e. =sum(C1/Total days remaining of the month)

    Suppose Today is April 01, 2009, C1/should be devided by 30,
    Tomorrow will be April 02, 2009, C1/should be devided by 29.

    Please advise about formula for cell-D4. Thanks.
    Last edited by sahar_sultana; 04-01-2009 at 04:30 PM.

  2. #2
    Registered User
    Join Date
    04-01-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel-formula required to calculate number of days remaining

    Hi,
    A1, B1, C1 and D4 are cell in Excel worksheet and values are 2, 4 and 6 in A1, b1 and c1 respectively.


    A1 B1 C1 D4
    2 4 6 C1-Formula is: =sum(A1+B1)

    Now I have to write formula for D4-cell:
    i.e. =sum(C1/Total days remaining of the month)

    Suppose Today is April 01, 2009, C1/should be devided by 30,
    Tomorrow will be April 02, 2009, C1/should be devided by 29.

    Please advise about formula for cell-D4. Thanks.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Excel-formula required to calculate number of days remaining

    This question has been answered multiple times on the cross-post:

    http://www.mrexcel.com/forum/showthread.php?t=381680
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    04-01-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel-formula required to calculate number of days remaining

    Hi,
    A1, B1, C1 and D1 are cell in Excel worksheet and values are 2, 4 and 6 in A1, b1 and c1 respectively.

    A1 value is 2
    B1 value is 4
    C1 values is 6 --C1-Formula is: =sum(A1+B1)

    Now I have written formula for D1-cell:
    =SUM(C1/(32-DAY(TODAY()+31)-4))
    Note: I substracted -4 in above formula because there are four sundays are in April, 2009 and I want to keep days only working days (Total days in April are 30 - sundays which are 4 = 26.)

    This spreadsheet will divide c1/26 on Wed April 1, 2009 according to formula.
    This spreadsheet will divide c1/25 on Thu April 2, 2009 according to formula.
    This spreadsheet will divide c1/24 on Fri April 3, 2009 according to formula.
    This spreadsheet will divide c1/23 on Sat April 4, 2009 according to formula.
    This spreadsheet will divide c1/22 on Sun April 5, 2009 according to formula.
    This spreadsheet will divide c1/21 on Mon April 6, 2009 according to formula.

    The problem is in Sunday calculation because Sunday is a Holiday and on Sunday the formula should be same as Sat C/23. On Monday formula should be C1/22 because working day has been started. How can I avoid calculation on date on Sundays and ignore decrease number on sundays. At the end of month on April 30, 2009 the formula should be C1/1.

    Please help in this situation/formula and advise about formula for cell-D4. Thanks.

  5. #5
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Childers QLD, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2013
    Posts
    128

    Re: Excel-formula required to calculate number of days remaining

    Hi,

    Could I make a suggestion. By using the weekday function would that assist you.

    ie =weekday(today()) would return a weekday value. Sunday = 1, maybe a >1 IF statement may help.

    Try it.

    Cheers


    Tony

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Excel-formula required to calculate number of days remaining

    just as a general comment, and I have seen it a lot

    =sum(a1+a2) is unsecessary

    =a1+a2

    sum is used to add values, not to perform a "Sum"

    also

    Please Login or Register  to view this content.
    will give you the number of workingdays to the end of the current month!
    Last edited by squiggler47; 04-03-2009 at 03:48 AM.

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Excel-formula required to calculate number of days remaining

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

  8. #8
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Childers QLD, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2013
    Posts
    128

    Wink Re: Excel-formula required to calculate number of days remaining

    Hi,

    I have been having some fun with this one, as per attachment.

    I cannot see this being done in a one cell formula, to allow for Sundays off.

    I don't understand the significance of Cells A1 to D1.

    Anyway, here it is.

    Cheers, Tony
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Excel-formula required to calculate number of days remaining

    these might do the trick :-

    Calculate number of sundays to end of month

    Please Login or Register  to view this content.
    sCalculates number of weekend days (sat,sun) to end of month
    Please Login or Register  to view this content.
    None sundays to end of month
    Please Login or Register  to view this content.
    Weekdays to end of month
    Please Login or Register  to view this content.
    hope they help!

    note both formulas count today in total!

    If you want to ignore today change "1:" to "2:" and delete the RED +1
    Last edited by squiggler47; 04-03-2009 at 10:06 AM. Reason: OOPS forcot to change L1 to today()!

  10. #10
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Excel-formula required to calculate number of days remaining

    TonyB51,

    here is 1 cell version!!
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Excel-formula required to calculate number of days remaining

    Thread closed - cross posting

Closed 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