+ Reply to Thread
Results 1 to 5 of 5

(SOLVED) How to sum of two or more columns when certain cell meets conditions

  1. #1
    Registered User
    Join Date
    05-03-2017
    Location
    Rijen, Netherlands
    MS-Off Ver
    2011
    Posts
    11

    (SOLVED) How to sum of two or more columns when certain cell meets conditions

    Hi,

    I try to explain the problem by stating what's in the cells
    A1 10 B1 12 C1 12343
    A2 13 B2 14 C2 11000
    A3 15 B3 24 C3 12343
    etc

    In cell D1 the invoicenummert is stated.
    What I want to achieve is that in cell D2 the sum appears of the digits in column A and B that meets the invoicenumber stated in D1. So when in D1 the nummer 12343 is entered that in cell D2 the results (SUM) gives (10+12+15+24= 61). This example is with two columns. In my sheet I have more and more rows.
    I can't seem to find the right formula.
    Can anyone help?

    Thanks
    Last edited by rvfotopro; 05-13-2017 at 02:59 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to sum of two or more columns when certain cell meets conditions

    Hi rvfotopro and welcome to the forum,

    In cell D1 put this formula.

    =SUMIF(C1:C3,C1,A1:A3)+SUMIF(C1:C3,C1,B1:B3)
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    05-03-2017
    Location
    Rijen, Netherlands
    MS-Off Ver
    2011
    Posts
    11

    Re: How to sum of two or more columns when certain cell meets conditions

    Thank you very much for this solution and it will defenitly work. I don't want to be ungrateful for this solution but I have really a lot of columns and rows and I hoped there was another solution in which I can give a area of cells like A1:Z100 for example. Is there one? Thanks.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to sum of two or more columns when certain cell meets conditions

    Is the invoice number always in column C?

    Try this
    =SUMPRODUCT((A1:B3)*(C1:C3=L1))

    The A1:B3 is the range that contains the numbers. The C1:C3 is the range that contains the Invoice number. L1 contains the Invoice number that you enter manually. Replace these ranges with your own values. You can also replace the fixed ranges with named dynamic ranges to cover the variable data rows and columns.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  5. #5
    Registered User
    Join Date
    05-03-2017
    Location
    Rijen, Netherlands
    MS-Off Ver
    2011
    Posts
    11

    Re: How to sum of two or more columns when certain cell meets conditions

    The invoice is entered manually always in the same cell. I tested it and it works perfectly, thank you so much!! Solved

+ 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. Pull Highest Cell Value that Meets Conditions
    By Phonix in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-13-2017, 05:19 PM
  2. Copy a Row if Cell Meets Conditions across two workbooks
    By elapo21 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-30-2012, 11:36 AM
  3. Copy a Row if Cell Meets Conditions
    By elapo21 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2012, 03:04 PM
  4. VBA: Copy cell if specific column meets 2 conditions
    By Aakron in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2012, 03:29 PM
  5. 1 cell meets 2 conditions from 2 different cell
    By Bakar in forum Excel General
    Replies: 2
    Last Post: 05-17-2011, 02:20 PM
  6. Replies: 3
    Last Post: 03-23-2010, 06:50 PM
  7. [SOLVED] Count Cells if diff cell meets conditions
    By DJS in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-12-2006, 11:50 AM

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