+ Reply to Thread
Results 1 to 3 of 3

Conditional sum of columns

Hybrid View

  1. #1
    randys
    Guest

    Conditional sum of columns

    If I have 1 row with 5 columns of data, how do I conditionally sum the
    columns based on whether the column is greater than a value in another
    separate cell? For example,

    A B C D E
    5 32 16 22 6 89
    6
    7 3


    I only want to sum A5:E5 if the column is greater than the contents of A7.
    In this example, the answer would be (6+89)=95. If A7=1, then the answer
    would be (16+22+6+89)=133.


  2. #2
    bj
    Guest

    RE: Conditional sum of columns

    =sumif(A1:E1,">"&A7)

    "randys" wrote:

    > If I have 1 row with 5 columns of data, how do I conditionally sum the
    > columns based on whether the column is greater than a value in another
    > separate cell? For example,
    >
    > A B C D E
    > 5 32 16 22 6 89
    > 6
    > 7 3
    >
    >
    > I only want to sum A5:E5 if the column is greater than the contents of A7.
    > In this example, the answer would be (6+89)=95. If A7=1, then the answer
    > would be (16+22+6+89)=133.
    >


  3. #3
    Domenic
    Guest

    Re: Conditional sum of columns

    Try...

    =IF(A7<>"",SUM(INDEX(A5:E5,A7+1):E5),"")

    Note that the formula sums all columns when A7 equals 0.

    Hope this helps!

    In article <0C011209-DDE9-4D73-A36F-6CADAB809502@microsoft.com>,
    randys <randys@discussions.microsoft.com> wrote:

    > If I have 1 row with 5 columns of data, how do I conditionally sum the
    > columns based on whether the column is greater than a value in another
    > separate cell? For example,
    >
    > A B C D E
    > 5 32 16 22 6 89
    > 6
    > 7 3
    >
    >
    > I only want to sum A5:E5 if the column is greater than the contents of A7.
    > In this example, the answer would be (6+89)=95. If A7=1, then the answer
    > would be (16+22+6+89)=133.


+ 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