+ Reply to Thread
Results 1 to 7 of 7

Sum up values from a column based on multiple criteria from different columns

  1. #1
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Sum up values from a column based on multiple criteria from different columns

    Hi friends,

    I'm stuck up to generate a formula for a set of data, I'm partially satisfied with the way I have formulated the logic but it's not giving me a correct result.

    To set a context, I have 8 columns with a set of data, I wanted 3 outputs- Output 1, Output 2 and Output 3
    Output 1 - output should be the sum of column H and column E where it has "Y"
    Output 2 - output should be the sum of column H and column F where it is "Y" and any value that is considered as part of the output in Output 1 should be ignored - basically no duplication on comparison with the earlier column
    Output 3 - output should be the sum of column H and column G where it is "Y" and any value that is considered as part of the output in Output 1 and Output 2 should be ignored - basically no duplication on comparison with the earlier columns


    I have attached a sample scenario with the data set and required outputs, please help me out with this. I wanted a formula to apply it for a larger set of data.
    Attached Files Attached Files

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

    Re: Sum up values from a column based on multiple criteria from different columns

    Hi Snehith and welcome to the forum.
    See my answer in the attached. It is using a SumIFS() solution.
    SumIfS 3 criteria buld for Snehith.xlsx
    I'm not positive about the 3rd option as I need more data to check it.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: Sum up values from a column based on multiple criteria from different columns

    Thank you so much for the quick response. I'm extending the data set which I will share in the thread. Please look into it and let me know what further updates are required

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,180

    Re: Sum up values from a column based on multiple criteria from different columns

    Shouldn't the Output 3 in Marvin's response be this?
    =SUMIFS(H2:H6,F2:F6,"<>Y",E2:E6,"<>Y",G2:G6,"Y")

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

    Re: Sum up values from a column based on multiple criteria from different columns

    Hey Greg,
    Thanks for the help. I wasn't feeling good about that Output 3 as I didn't see where it came from. Let's see if Snehith thinks it is the correct formula now.

  6. #6
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: Sum up values from a column based on multiple criteria from different columns

    Extending the current set of data, now I have a different assessment number and multiple persons as well

    Output 1 - output should be the sum of column H and column A where it is "A1" and column E where it has "Y"
    Output 2 - output should be the sum of column H and column A where it is "A1" and column F where it is "Y" and any value that is considered as part of the output in Output 1 should be ignored - basically no duplication on comparison with the earlier column
    Output 3 - output should be the sum of column H and column A where it is "A1" and column G where it is "Y" and any value that is considered as part of the output in Output 1 and Output 2 should be ignored - basically no duplication on comparison with the earlier columns
    Output 4 - output should be the sum of column H and column A where it is "A2" and column E where it has "Y"
    Output 5 - output should be the sum of column H and column A where it is "A2" and column J where it is "Y" and any value that is considered as part of the output in Output 4 should be ignored - basically no duplication on comparison with the earlier column
    Output 6 - output should be the sum of column H and column A where it is "A2" and column K where it is "Y" and any value that is considered as part of the output in Output 4 and Output 5 should be ignored - basically no duplication on comparison with the earlier column
    Output 7 - output should be the sum of column H and column A where it is "A2" and column L where it is "Y" and any value that is considered as part of the output in Output 4 and Output 5 and Output 6 should be ignored - basically no duplication on comparison with the earlier column

    Thanks & regards,
    Snehith
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: Sum up values from a column based on multiple criteria from different columns

    Thanks a lot, your inputs were very helpful. I have extended the formula to apply to a larger set of data.

    I have utilised Greg's logic.

    Regards,
    Snehith

+ 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. Unique values from two columns based on criteria in 3rd column by vba
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-09-2019, 12:04 PM
  2. Sum values in one column based on Criteria in Multiple Columns
    By jcjc7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-27-2017, 02:05 AM
  3. Sum multiple columns, each column based on criteria from different columns
    By windrain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2017, 08:24 PM
  4. Sum values based on multiple criteria in rows and columns
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-20-2015, 03:09 AM
  5. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  6. Replies: 1
    Last Post: 02-14-2013, 02:32 PM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 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