Sumifs with several criteria

sheri521

New Member
Joined
Oct 11, 2013
Messages
3
I am trying to write a formula that does the following:

I have data with say 200 company names, their interest income each year, the year the income was generated, and who they received interest income from (one of 200 other companies).
I want to sum the interest income (which is in 3 different columns) where the company is one of 2+, the year is 1 specific year, and their partner is one of 2+.

Example: Sum where company A, company b, and company c have interest income with company 2, company 4, or company 6, in 2004.

My data looks like this:

tab1:
A B
1 company a
2 company b
3 company c
4 2004
5 company 2
6 company 4
7 company 6


tab 2:
A B C D E F
1 company a 2004 company 2 $100 $20 $0
2 company b 2004 company 3 $0 $0 $35
3 company c 2004 company 4 $10 $0 $60
4 company d 2004 company 5 $0 $45 $10
5 company e 2004 company 6 $50 $75 $5
6 company a 2005 company 1 $100 $20 $0
7 company b 2005 company 4 $0 $0 $35
8 company c 2005 company 2 $10 $0 $60
9 company d 2005 company 7 $0 $45 $10
10 company e 2005 company4 $50 $75 $5

If anyone can help that would be awesome!! so far I have tried:
=SUMIFS(tab2!d1:f10,tab2!b1:b10,tab1!b4,tab2!a1:a10,tab1!a1:a3,tab2!c1:c10,tab1!a5:a7)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to MrExcel.

Try eg:

=SUMPRODUCT(((Sheet2!A1:A10=A1)+(Sheet2!A1:A10=A2)+(Sheet2!A1:A10=A3))*(Sheet2!B1:B10=A4)*((Sheet2!C1:C10=A5)+(Sheet2!C1:C10=A6)+(Sheet2!C1:C10=A7))*Sheet2!D1:F10)

SUMIFS can only handle a single column range to sum.
 
Upvote 0
This is better - I am getting "0" as my answer instead of #value.
I checked to make sure my ranges were the same length in all criteria, my interest number is actually a # and not text, my company names are exactly the same on both tabs - but still getting 0
Any wild ideas what might be causing this?
 
Upvote 0
If you are getting a result of zero check that your numbers are actually numbers (use the ISNUMBER function). This shows that the formula is working for me:


Excel 2010
ABCDEFGHI
1company a190company a2004company 2100200
2company bcompany b2004company 30035
3company ccompany c2004company 410060
42004company d2004company 504510
5company 2company e2004company 650755
6company 4company a2005company 1100200
7company 6company b2005company 40035
8company c2005company 210060
9company d2005company 704510
10company e2005company 450755
Sheet1
Cell Formulas
RangeFormula
B1=SUMPRODUCT(((D1:D10=A1)+(D1:D10=A2)+(D1:D10=A3))*(E1:E10=A4)*((F1:F10=A5)+(F1:F10=A6)+(F1:F10=A7))*G1:I10)
 
Upvote 0
Got it!! Some of my company names had an extra space after them so I had to use the trim formula. Thanks so much for your help - your formula works great!!
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top