ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sum if with an and (https://www.excelbanter.com/excel-worksheet-functions/237165-sum-if.html)

Marlaine

sum if with an and
 
I have 3 columns of data, A contains the type, B contains the quarter and C
contains the value to add. I was to add up all the "Any" types in "Q1!. I
thought I was pretty clever with the following equation but it returns the
#VALUE!.

=IF(A3:A15="Any",SUMIF(B3:B15,"Q1",C3:C15),0)

It appears to be around A3:A15 but I cant figure out why. I made sure
everything was text that should be. I am still on Excel 2003 so cannot use
SUMIFS which someone showed me.
--
Thanks
Marlaine

Teethless mama

sum if with an and
 
=SUMPRODUCT(--(A3:A15="Any"),--(B3:B15="Q1"),C3:C15)


"Marlaine" wrote:

I have 3 columns of data, A contains the type, B contains the quarter and C
contains the value to add. I was to add up all the "Any" types in "Q1!. I
thought I was pretty clever with the following equation but it returns the
#VALUE!.

=IF(A3:A15="Any",SUMIF(B3:B15,"Q1",C3:C15),0)

It appears to be around A3:A15 but I cant figure out why. I made sure
everything was text that should be. I am still on Excel 2003 so cannot use
SUMIFS which someone showed me.
--
Thanks
Marlaine


Per Jessen

sum if with an and
 
Hello Marlaine

Try this formla:

=SUMPRODUCT(--(A3:A15="Any"),--(B3:B15="Q1"),C3:C15)

Regards,
Per

"Marlaine" skrev i meddelelsen
...
I have 3 columns of data, A contains the type, B contains the quarter and C
contains the value to add. I was to add up all the "Any" types in "Q1!.
I
thought I was pretty clever with the following equation but it returns the
#VALUE!.

=IF(A3:A15="Any",SUMIF(B3:B15,"Q1",C3:C15),0)

It appears to be around A3:A15 but I cant figure out why. I made sure
everything was text that should be. I am still on Excel 2003 so cannot
use
SUMIFS which someone showed me.
--
Thanks
Marlaine




All times are GMT +1. The time now is 11:15 AM.

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