sumif with one criteria column, 3 sum columns?

taigovinda

Well-known Member
Joined
Mar 28, 2007
Messages
2,639
Hi,

I want to have a sumif that reads the criteria from just one column, but adds up the numbers from three columns if the criteria is correct.

Currently I have named ranges defined as:

Dept_Line =OFFSET(Essbase!$R$1,0,0,COUNTA(Essbase!$R:$R)+12,1)
Dept_Data_1 =OFFSET(Dept_Line,0,-15,,3)

So "Dept_Line" is the criteria column and "Dept_Data_1" is 3 columns that I want to sum if the criteria matches.

The formula I am trying to use looks like this:
=SUMIF(Dept_Line,$A8,Dept_Data_1)

What I want is, for example, if A8="pick_me", and in one row "Dept_Data_1" has 3,2,5 and "Dept_Line" has "pick_me" then I want my formula to return 3+2+5=10. Currently it is returning only 3... I could just add up 3 different sumif's, but then I need to name 3x as many ranges!

Any ideas?

Thanks!!!

Tai
 

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,)
Control+shift+enter

=SUM(IF(Dept_Line=$A8,Dept_Data_1))

Better:

Create a total column that calculates a subtotal for every record in Dept_line and change the definition

Dept_Data_1 =OFFSET(Dept_Line,0,-15,,3)

to:

Dept_Data_1 =OFFSET(Dept_Line,0,-15,,4)

Then invoke:

=SUMIF(Dept_Line,$A8,INDEX(Dept_Data_1,0,4))
 
Upvote 0
Thanks to both of you for the replies. I realized that I need to also refer to the three columns individually after all, so I'll just name them all. However these techniques will be very handy for me shortly!

Thanks again!

Tai
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,783
Members
449,049
Latest member
greyangel23

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