Sumifs with a range of columns to sum

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
A
B
C
D
E
F
G
H
I
1
SumClient
Yr
Period
Invoice Date
Item Code
Cost
Disc
Adj
BALANCE
2
A569
2018
1
12/01/2018
MEDIA
100.00
212.14
3
A569
2018
1
12/01/2018
MEDIA
56.25
(3.25)
4
A569
2018
1
18/01/2018
MEDIA
56.25
2.89
5
SE152
2018
1
04/01/2018
MEDIA
1,071.20
(4,619.55)
-
6
SE152
2018
1
12/01/2018
MEDIA
1,272.05
7
SE152
2018
1
25/01/2018
MEDIA
2,276.30
How can I change the formula I have in I2, I5 etc to:
(a) sum columns F to H
(b) using A2 and C1 as criteria (like in sumifs)
Currently I have this formula in I2, but it's not working:
=IF(COUNTIFS($A$2:A2,A2,$C$2:C2,I2)=1,SUM(IF($A:$A=A2,$F:$H),""))


<tbody>
</tbody>
 
Last edited:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

Is this what you mean:


Book1
ABCDEFGHI
1SumClientYrPeriodInvoice DateItem CodeCostDiscAdjBALANCE
2A569201811/12/2018MEDIA100212.14
3A569201811/12/2018MEDIA56.25-3.25
4A569201811/18/2018MEDIA56.252.89
5SE152201811/4/2018MEDIA1,071.20-4,619.550
6SE152201811/12/2018MEDIA1,272.05
7SE152201811/25/2018MEDIA2,276.30
Sheet256
Cell Formulas
RangeFormula
I2=IF(COUNTIFS(A$2:A2,A2,C$2:C2,C2)=1,SUMPRODUCT((A$2:A$7=A2)*(C$2:C$7=C2)*F$2:H$7),"")


Change/adjust cell references/range according to your data, formula copied down.
 
Upvote 0

Forum statistics

Threads
1,215,336
Messages
6,124,332
Members
449,155
Latest member
ravioli44

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