+ Reply to Thread
Results 1 to 3 of 3

Sum numbers and change cell color each time a target total is reached

  1. #1
    Registered User
    Join Date
    09-18-2014
    Location
    US
    MS-Off Ver
    Office 2010
    Posts
    1

    Sum numbers and change cell color each time a target total is reached

    Hello,

    I have been looking for a way to sum cells until they reach a target number. For example

    C10 123
    C11 158
    C12 202
    C13 245
    C14 114
    C15 145
    C16 157
    C17 178
    C18 187

    C52 450


    Cell C52 is variable based on other factors, currently set to 450, I want it to add the above numbers until it reaches or exceeds C52 value, highlight the cells and then continue adding again until it hits or exceeds C52 value etc. until it reaches the end of the cell range.

    So in the above example, it would highlight 123/158/202 and then start again until it hit anoher grouping that exceeded 450 and then color it differently and so on.

    Any help would be appreciated

    Thanks,

    Mike

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Sum numbers and change cell color each time a target total is reached

    Hi Mike,
    Welcome to the Forum.

    If you are open to a VBA solution to achieve this, please find the attached sheet and click on the Green Button on Sheet1 to get the desired output.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    11-25-2013
    Location
    Western Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Sum numbers and change cell color each time a target total is reached

    Another approach is to use a helper column to do the additions, and then use conditional formatting to indicate the last cell of each group.

    This doesn't let you assign a different colour to each group, but if you use an underline instead, then it still indicates the different groups. I've attached an example.
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 04-30-2013, 05:57 AM
  2. Replies: 5
    Last Post: 01-22-2013, 11:38 AM
  3. [SOLVED] have values in column change color after a certain total is reached
    By patrickmcdiver in forum Excel General
    Replies: 9
    Last Post: 04-24-2012, 09:29 AM
  4. Replies: 1
    Last Post: 04-24-2012, 12:17 AM
  5. Replies: 4
    Last Post: 01-20-2009, 03:11 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