+ Reply to Thread
Results 1 to 3 of 3

Sum until a condition is met and repeat for a range

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Sum until a condition is met and repeat for a range

    Hi,

    I'm a relative beginner at Excel. I am working with some data and I need to sum the values in a column until the total is less than or equal to 10 million and then repeat the process throughout the column. For example, in the numbers below, the first 7 sum to 9,449,345. I would ideally like there to be some indication through highlighting or something that its as close to 10m as it can get and then repeat the formula. I have to do this for several thousand cells. Any help is greatly appreciated.

    Column I
    1 1,845
    2 1,750,000
    3 1,600,000
    4 200,000
    5 97,500
    6 5,400,000
    7 400,000
    8 1,380,000
    9 5,473
    10 2,850,000
    11 69,000
    12 390,000
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,102

    Re: Sum until a condition is met and repeat for a range

    Try:

    J2: =IF(I2+N(J1)<=10000000,I2+N(J1),I2) and copy down.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Sum until a condition is met and repeat for a range

    Thank you, that worked! Is there a way to, (in a new column, let's say K) to then assign a number 1 to the first group less than 10 million, 2 to the next, and so on. Again thank you very much for your help!

+ 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