+ Reply to Thread
Results 1 to 4 of 4

Two sums of column based on conditional split

Hybrid View

  1. #1
    Registered User
    Join Date
    04-08-2008
    Posts
    2

    Cool Two sums of column based on conditional split

    Hi!
    I want to get two sums of multiple cells in the same column. The column cells have values first decreasing then increasing. The first sum goes from top of the column down to the minimum value, the second sum from the minimum value to the end of the column.
    So far I can get the cell address of the minima in a new cell, but I can't manage to set up the two sums by the use of this cell reference. Any idea to solve this?

  2. #2
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    use a helper column and check if second value is less than first value, if it is put first value at top of helper column otherwise put zero in top of helper column. Then check if third value of column 1 is less than second value, if it is, put secons value of column 1 otherwise zero.

    Process whole list, total of helper column is the decreasing series total, total of column 1 MINUS total of column 2 is the increasing series total.

  3. #3
    Forum Contributor
    Join Date
    01-05-2004
    Location
    Helsinki, Finland
    Posts
    100
    Hi,

    if your data is in column A (and starts from the top as you say), you can use these formulas:

    =SUM(INDIRECT("A1:A"&MATCH(MIN(A:A),A:A,0)))

    =SUM(INDIRECT("A"&MATCH(MIN(A:A),A:A,0)&":A"&COUNT(A:A)))

    Note that there can be no other data in column A.

    Hope this helps.

    - Asser

  4. #4
    Registered User
    Join Date
    04-08-2008
    Posts
    2

    Smile

    Thank's a lot,
    Couldn't wait and solved it temporarely by some helper columns similar to Robert111 suggestion. I was looking for something like the Jazzer solution, thank's a lot will test this in the next phase!!

+ 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