View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cloughitup Cloughitup is offline
external usenet poster
 
Posts: 2
Default Sum multiple cells if a column has a certain number in it

How would I add both together? Meaning the =SUMIF(A1:A100,2,F1:F100), worked
but I also want it to add the =SUMIF(H1:H100,2,M1:M100), all in one cell.
Would it be =SUMIF(A1:A100,2,F1:F100)+(H1:H100,2,M1:M100)? Itried that but it
did not work.

"Bernard Liengme" wrote:

=SUMIF(A1:A100,2,F1:F100)
will sum all the F values when the corresponding A value is 2

=SUMIF(A1:A100,Z1,F1:F100)
will sum all the F values when the corresponding A value is the same as the
value in Z1

If you wish to sum with more than one criteria (test) you can:
1) use SUMIFS if you are working in Excel 2007
or
2) use SUMPRODUCT (in any Excel version)
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email