+ Reply to Thread
Results 1 to 6 of 6

Conditional SUMIF based on multiple columns and multiple row variables

Hybrid View

  1. #1
    Registered User
    Join Date
    05-14-2016
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    3

    Conditional SUMIF based on multiple columns and multiple row variables

    Hello everyone. I am new to the forum and I'm stumped. I am trying to solve something that seems very simple but is complicated (to me)

    I will attempt to provide a simple explanation to help illustrate what I am attempting to accomplish. I want to determine the number of Net Corrections by subtracting the number of reversals from the total number of corrections within a particular time period. A countif will provide me a total number of each but I need it to be conditional where it only counts reversals if a corresponding correction exists linked on an ID number. Please see the example below. 1234 Correction Exists so I want it to count 1234 reversal so the total number of reversals would be 1 for a Net Corrections Result of 2 as you can see it is counting all of the corrections and all of the reversals presently.

    Capture.PNG

    Is something like this possible? Anyone have any ideas? Any help would be greatly appreciated. Thank you.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Conditional SUMIF based on multiple columns and multiple row variables

    Hi, welcome to the forum

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-14-2016
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    3

    Re: Conditional SUMIF based on multiple columns and multiple row variables

    Thank you Ford. Here is the workbook with a small desensitized example of the data and a mock up of the expected results as suggested. Much appreciated.
    Attached Files Attached Files
    Last edited by jaymaan74; 05-15-2016 at 07:49 AM.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional SUMIF based on multiple columns and multiple row variables

    Hi
    Try this array formula (CTRL+SHIFT+ENTER instead ENTER)
    Formula: copy to clipboard
    =COUNTIF($B$2:$B$7,$B$11)-COUNTIFS($A$2:$A$7,$A$2:$A$7,$B$2:$B$7,$B$12)

    for Corrections, and this other for Reversals
    Formula: copy to clipboard
    =COUNTIF($B$2:$B$7,$B$12)-COUNTIFS($A$2:$A$7,$A$2:$A$7,$B$2:$B$7,$B$11)


    Note that B11 and B12 has the text [Correction] and [Reversal] respectively.
    See the file Livro1_15_05.xlsx

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional SUMIF based on multiple columns and multiple row variables

    Hi
    Use in C15
    Formula: copy to clipboard
    =COUNTIFS($A$2:$A$7,$A$2:$A$7,$B$2:$B$7,$B$15)
    this array formula

  6. #6
    Registered User
    Join Date
    05-14-2016
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    3

    Re: Conditional SUMIF based on multiple columns and multiple row variables

    Thank you very much Jose! The solution provided doesn't yield the expected results as listed in the mock-up, but it did provide me the proper array formula to identify my duplicate population compared to the criteria. With a few tweaks I was able to make it work exactly as I needed it to. I am eternally grateful as I didn't even know where to begin and you assistance ultimately provided me the solution to my problem. the desired end results. Cheers sir!

+ 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] Sum multiple columns based on multiple variables
    By dmschave in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-29-2014, 11:25 AM
  2. [SOLVED] Conditional Formula based upon multiple columns
    By KsuGuy26 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-03-2013, 01:13 PM
  3. Compare multiple columns with multiple variables
    By rfisc270 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-15-2010, 10:40 AM
  4. sumif formula for multiple variables
    By motobeyek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-31-2010, 11:01 PM
  5. Multiple Variables - Sumif error
    By gustavo.simoes1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-21-2009, 09:07 AM
  6. SUMIF for multiple variables
    By Kjaer in forum Excel General
    Replies: 3
    Last Post: 08-13-2007, 11:56 AM
  7. Sumif with multiple variables
    By les8 in forum Excel General
    Replies: 5
    Last Post: 04-07-2006, 09:20 PM
  8. [SOLVED] SUMIF in multiple columns based on other criteria in Excel?
    By Scott Powell in forum Excel General
    Replies: 9
    Last Post: 04-13-2005, 10:06 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