Sumif using several columns

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
787
Office Version
  1. 365
Platform
  1. Windows
trying to add columns using a sumif

The names I'm using are in columns A, H and and J and the figures in B, F and K

Tried the formula belw but wouldnt work, said too many arguments

(A1:A30,E1:E30,H1:H30,J1:J30,"Dog",B1:B30,F1:F30,I1:I30,K1:K30) and tried named ranges =SUMIF(animal,"dog",age) and get value #
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,945
Office Version
  1. 365
Platform
  1. Windows
I think you would get a better response if you could show an example of your data and the expected results.
 
Upvote 0

s hal

Board Regular
Joined
Apr 10, 2013
Messages
198
SUMIF() only accepts ONE codition and ONE range to check and ONE range to sum - you fed it too many conditions, which is why you got an error.

SUMIFS() is maybe what you want to use (if you are in 2007 or later version). Or the more advanced, SUM(IF()) if you are not.

I can't answer why your named range method didn't work, but I'd speculate for the same reason the first SUMIF() example did not.
 
Upvote 0

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
787
Office Version
  1. 365
Platform
  1. Windows
I think you would get a better response if you could show an example of your data and the expected results.

Table below is in 3 different columns and it needs to add up the age every time dog appears



ANIMAL
Age
dog
5
cat
3
rabbit
2
dog
4
canary
3
parrot
2
snake
1



<tbody>
</tbody>
 
Upvote 0

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
787
Office Version
  1. 365
Platform
  1. Windows
ADVERTISEMENT
unfortunately only have 2003, but out of curiosity how would the formula appear in 2007 using sumifs
 
Upvote 0

s hal

Board Regular
Joined
Apr 10, 2013
Messages
198
You just need to have 3 SUMIF() functions: SUMIF()+SUMIF()+SUMIF(). There's probably a more complicated way to do this as well, but I'd stick with the basics...
 
Upvote 0

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,945
Office Version
  1. 365
Platform
  1. Windows
One option:
Excel Workbook
ABCDEFGHIJ
1ANIMALAgeANIMALAgeANIMALAgeSum
2dog5dog5dog527
3cat3cat3cat3
4rabbit2rabbit2rabbit2
5dog4dog4dog4
6canary3canary3canary3
7parrot2parrot2parrot2
8snake1snake1snake1
Create or Edit a Quote
 
Upvote 0

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
787
Office Version
  1. 365
Platform
  1. Windows
thanks guys I'll use the 3 sumifs adding them together, you both suggested
 
Upvote 0

Forum statistics

Threads
1,195,853
Messages
6,011,969
Members
441,658
Latest member
Carlos O

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