ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sum cells based on multiple criteria (https://www.excelbanter.com/excel-programming/316414-sum-cells-based-multiple-criteria.html)

Jessie

sum cells based on multiple criteria
 
hello,

i am trying to sum cells G6:G66 only if (A6:A66="date" and E6:E66="dept")
does anyone have an idea of how to do this.

thank you,
jessie

JulieD

sum cells based on multiple criteria
 
Hi Jessie

assuming you're not using VBA code to do this then one formula would be
=SUMPRODUCT(--(A6:A66="date"),--(E6:D66="dept"),G6:G66)

note, if you're using actual dates and not the cell reference containing the
date you want to sum on, you need to put the date into another function e.g.
=SUMPRODUCT(--(A6:A66=DateValue("01/01/05")),--(E6:D66="dept"),G6:G66)

Cheers
JulieD


"jessie" wrote in message
...
hello,

i am trying to sum cells G6:G66 only if (A6:A66="date" and E6:E66="dept")
does anyone have an idea of how to do this.

thank you,
jessie




Frank Kabel

sum cells based on multiple criteria
 
Hi
=SUMPRODUCT(--(A6:A66="date"),--(E6:E66="dept"),G6:G66)

Also see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards
Frank Kabel
Frankfurt, Germany

"jessie" schrieb im Newsbeitrag
...
hello,

i am trying to sum cells G6:G66 only if (A6:A66="date" and

E6:E66="dept")
does anyone have an idea of how to do this.

thank you,
jessie




All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com