Sum_Range with multiple rows and columns

VonRobbo

New Member
Joined
Mar 12, 2018
Messages
5
Greetings.

I'm basically trying to do a SUMIFS statement, but instead of only summing single cells in a row or column when a certain criteria is met, I want to sum a whole row of cells when a criteria is met.

For example I want to be able to do something like:
=SUMIFS(B2:E10,A2:A10,"Apples")

If A3 = "Apples, I will get the sum of all cells from B3:E3.

When I do a formula like the above, I get a #VALUE! result.

This seems like an easy thing that I'm sure someone must have done before. Any assistance is greatly appreciated.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi VonRobbo,

Does this work?

Book1
DEFGH
1Total=265
2Pears2216487
3Apples56563513
4Oranges59972134
5Lemons5829662
6Pears1316764
7Apples21241545
8Oranges7504329
9Lemons11926030
10Bananas8147475
Sheet1
Cell Formulas
RangeFormula
E1E1=SUMPRODUCT(E2:H10*(D2:D10="Apples"))
 
Upvote 0
Greetings.

I'm basically trying to do a SUMIFS statement, but instead of only summing single cells in a row or column when a certain criteria is met, I want to sum a whole row of cells when a criteria is met.

For example I want to be able to do something like:
=SUMIFS(B2:E10,A2:A10,"Apples")

If A3 = "Apples, I will get the sum of all cells from B3:E3.

When I do a formula like the above, I get a #VALUE! result.

This seems like an easy thing that I'm sure someone must have done before. Any assistance is greatly appreciated.
VBA Code:
=SUM(SUMIF(A2:A10,"Apples",OFFSET($B$2,,{0,1,2,3})))
Or
=SUM(MMULT(N(A2:A10="Apples")*B2:E10,{1;1;1;1}))
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,591
Members
449,174
Latest member
chandan4057

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