Sum horizontal and vertical based on criteria

cwallace70

Board Regular
Joined
Mar 7, 2011
Messages
160
I am trying to get the sum of a product in column A:A with the amounts in columns AD:JN.

I tried this sumif formula
=SUM(IF('Apr 8-CM GL v ACS Recon Detail'!A:A=$A13,$AD:$JN))
and it returns zero.

I tried sumproduct
=SUMPRODUCT('Apr 8-CM GL v ACS Recon Detail'!AD:JN,'Apr 8-CM GL v ACS Recon Detail'!A:A=Sumary!A:A)
and it a returned a #N/A

I hope someone can help me with these formulas.

On sheet 1 a product A in col A:A is equal to a product on sheet 2 col A:A, then sum AD:JN

Thank you
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Oscar Cronquist

Board Regular
Joined
Apr 20, 2018
Messages
200
I tried this sumif formula
=SUM(IF('Apr 8-CM GL v ACS Recon Detail'!A:A=$A13,$AD:$JN))
To make that work you need to enter that as an array formula.

1. Type the formula in a cell
2. Press and hold CTRL and SHIFT
3. Press Enter

Your formula has now a beginning and ending curly bracket. {=formula}
Don't eneter these characters yourself.

https://exceljet.net/glossary/array-formula


A
B
C
D
E
F
G
H
1
A
1​
5​
A
16​
2
B
2​
6​
3
A
3​
7​
4
D
4​
8​
Sheet: Sheet83

Array formula in cell H1:
=SUM(IF(B1:B4=G1,C1:D4,0))
 

Forum statistics

Threads
1,141,715
Messages
5,708,058
Members
421,541
Latest member
Akidev

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
Top