Closed Thread
Results 1 to 3 of 3

Sum multiple Columns, but not exceeding a certain value.

  1. #1
    Registered User
    Join Date
    10-04-2019
    Location
    Ohio
    MS-Off Ver
    O365
    Posts
    3

    Sum multiple Columns, but not exceeding a certain value.

    Good morning.

    I am not real sure how to describe this question in a concise way, so I will just go ahead and give it a shot.

    Scenario:

    I have selected a number. For this scenario, that number is 30.
    I have two columns, (Minus) and (Plus). One column will subtract from the Max Value. The other column will add to the Max Value.
    I have a cell (Current Total) that will actively display the current total as values are inputted into either column.
    As values are inputted into the "Minus" and "Plus" columns, they are either added or subtracted from 30, and the results are displayed in the "Current Total" cell.

    Special circumstances:
    1. The "Current Total" should never go above the max value I selected (30), even if the "Plus" column totals more than the "Minus" column.
    I used =MIN(30,(E3-SUM(C11:C19)+SUM(D11:D19))) to achieve this.

    The problem:

    If the "Add" column totals more than 30, the "Current Total" correctly displays 30, but anything above 30 should not impact the subtracted column.
    I am trying to get a running total of the two columns, with the total never going above the Max Value.

    Picture Example:

    1. Max number is 30.
    2. 2 is inputted in the "Minus" column. 28 is correctly displayed.
    3. 1 is inputted into the "Minus" column. 27 is correctly displayed.
    4. 10 is inputted into the "Plus" column. 30 is correctly displayed, but the leftover 7 is still in the calculation, just not seen (37).
    5. 6 is inputted into the "Minus" column. What is desired is that 6 is subtracted from the "Current Total", instead of it being subtracted from that true total (37) that is unseen.
    6. The expected value for the "Current Total" is 24

    Attachment 643983


    Does this make sense?

    Thank you in advance for any help.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Sum multiple Columns, but not exceeding a certain value.

    Duplicate thread.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,958

    Re: Sum multiple Columns, but not exceeding a certain value.

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: link to be added here
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sum multiple Columns, but not exceeding a certain value.
    By Dashminus in forum Excel General
    Replies: 3
    Last Post: 10-04-2019, 12:29 PM
  2. [SOLVED] how to use IF without exceeding certain amount !!
    By bkcffee in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-06-2018, 09:44 AM
  3. Mailto Exceeding 255 Characters
    By Kapi187 in forum Excel General
    Replies: 1
    Last Post: 02-01-2013, 01:33 AM
  4. [SOLVED] Value exceeding target to be negative
    By arconite in forum Excel General
    Replies: 5
    Last Post: 12-24-2012, 01:58 AM
  5. [SOLVED] Counting multiple instances of same name and calculating charges that exceeding 5 postings
    By Tom Collins in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2012, 02:50 PM
  6. Exceeding 65,000 rows
    By moglione1 in forum Excel General
    Replies: 0
    Last Post: 09-14-2005, 09:45 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