+ Reply to Thread
Results 1 to 4 of 4

SUM 2 COLUMNS based on condition

  1. #1
    Registered User
    Join Date
    09-14-2010
    Location
    Park City, UT
    MS-Off Ver
    2010
    Posts
    19

    SUM 2 COLUMNS based on condition

    Hello,

    I need to sum the values in 2 columns (COL A and COL C) row-by-row IF both cells in each row (of COL A and COL C) have a value greater than 0. I cannot put the columns together because the data is being pulled from a Pivot Table.

    EXAMPLE:
    COL A COL B COL C
    5 unrelated data 10
    3 unrelated data
    unrelated data 7
    2 unrelated data 17
    unrelated data 1
    3 unrelated data

    The total should come to 34. I was thinking SUMIFS but that won't work since it only sums on a single range. I started trying the SUMPRODUCT formula, but am not getting anywhere. Thanks for any help.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM 2 COLUMNS based on condition

    Try

    =SUMPRODUCT(--(A2:A7>0),--(C2:C7>0),A2:A7+C2:C7)

  3. #3
    Registered User
    Join Date
    09-14-2010
    Location
    Park City, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: SUM 2 COLUMNS based on condition

    Works perfect! Thank you for solving my problem!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM 2 COLUMNS based on condition

    You're welcome.

+ 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. [SOLVED] Help for Sum of different columns with a multiplying based on condition
    By kenytr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-30-2017, 10:50 AM
  2. How to concatenate 2 columns based on a condition
    By kisnah in forum Excel General
    Replies: 16
    Last Post: 09-29-2015, 04:16 AM
  3. Hide columns based on condition
    By tanya9709 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2015, 02:17 AM
  4. COUNTIF based on condition from 2 columns
    By alexandruc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-07-2009, 06:06 AM
  5. return a value based on condition in 2 columns
    By ShyGuy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-22-2008, 03:28 PM
  6. [SOLVED] Hide Columns Based on Condition
    By Skornia115 in forum Excel General
    Replies: 3
    Last Post: 07-05-2006, 06:35 PM
  7. Hide Columns Based on Condition
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2006, 02:45 PM

Tags for this Thread

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