+ Reply to Thread
Results 1 to 8 of 8

Need to sum up to 50 values until the sum is equal to or greater than a specific value

Hybrid View

  1. #1
    Registered User
    Join Date
    08-15-2015
    Location
    DC
    MS-Off Ver
    2010
    Posts
    7

    Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Hi,

    I have to add actual varying amounts in a range of numbers located in one row/column until a specified target amount is reached, then populate a cell with the earliest date the target was met.
    I also need to be able to change the targets and have a new date generated.

    Ty
    Last edited by TakiTaki; 08-15-2015 at 09:03 AM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    Date
    Amount
    ------
    Target
    Date
    2
    8/1/2015
    87
    300
    8/6/2015
    3
    8/2/2015
    51
    4
    8/3/2015
    59
    5
    8/4/2015
    13
    6
    8/5/2015
    82
    7
    8/6/2015
    36
    8
    8/7/2015
    93
    9
    8/8/2015
    90
    10
    8/9/2015
    15


    This array formula** entered in E2:

    =INDEX(A2:A10,MATCH(TRUE,SUBTOTAL(9,OFFSET(B2,,,ROW(B2:B10)-ROW(B2)+1))>=D2,0))

    Format as Date

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    If the target value is not met the formula will return an #N/A error.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-15-2015
    Location
    DC
    MS-Off Ver
    2010
    Posts
    7

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Hi, Thank you for your reply-

    After changing the info to reflect my data, did the ctrl/shift/ent and I'm getting a date value that is not listed in the table and when I change the target number, the formula doesn't give a different answer. (target # is a link)
    Last edited by TakiTaki; 08-15-2015 at 11:12 AM.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    How about sharing the file, without confidential information?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    08-15-2015
    Location
    DC
    MS-Off Ver
    2010
    Posts
    7

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Its working in the share file now but not my own yet....
    I've attached so people can see what I meant and offer additional methods they would use as well
    However the formula is working perfectly now in the share file and updates to the correct value when I change the targets-
    The only difference between the two is the custom mask of the date (one style vs another)


    Earliest Date.jpg

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Here's another option...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Date
    Amount
    Subtotal
    ------
    Target
    Date
    2
    8/1/2015
    87
    87
    300
    8/6/2015
    3
    8/2/2015
    51
    138
    4
    8/3/2015
    59
    197
    5
    8/4/2015
    13
    210
    6
    8/5/2015
    82
    292
    7
    8/6/2015
    36
    328
    8
    8/7/2015
    93
    421
    9
    8/8/2015
    90
    511
    10
    8/9/2015
    15
    526


    Enter this formula in C2 and copy down as needed:

    =SUM(B$2:B2)

    Enter this array formula** in F2:

    =INDEX(A2:A10,MATCH(TRUE,C2:C10>=E2,0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  7. #7
    Registered User
    Join Date
    08-15-2015
    Location
    DC
    MS-Off Ver
    2010
    Posts
    7

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Its working in my file now as well. How do I update thread to "solved"?

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to sum up to 50 values until the sum is equal to or greater than a specific value

    Good deal. Thanks for the feedback!

    To mark a thread as being solved...

    Immediately above post #1 there is a menu bar.

    From that menu bar select Thread Tools then select Mark this thread as solved...

+ 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. What two values x rate will equal specific amount
    By ExcelJET in forum Excel General
    Replies: 5
    Last Post: 07-16-2015, 08:08 PM
  2. SumIfs containing a greater than or equal to And less than or equal to
    By teton88 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-15-2014, 07:47 PM
  3. [SOLVED] COUNTIFS function w/greater than or equal to, and less than or equal to time values
    By AliciaRenee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-27-2014, 03:57 PM
  4. Delete rows with cell values equal to or greater than current week number
    By Pradeep M B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2013, 09:39 AM
  5. Counting values in ColA is greater or equal to those in ColB
    By Hugh Evans in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2012, 08:20 AM
  6. Counting values greater than or equal to those in another column
    By andyr85 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-26-2010, 04:15 PM
  7. Replies: 4
    Last Post: 04-24-2008, 10:08 AM

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