![]() |
sumif statement
I am begging for your help again ...
I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
not sure if this is exactly what you want
in col G =IF(AND(E1="1",H1="1"),"1","") then add up the totals in col G "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
Jackie,
try: =SUMPRODUCT(--(E2:E10=1),--(H2:H10=1),--(G2:G10)) "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
sorry i mean
=IF(AND(E1=1,H1=1),1,"") "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
this is close - but it only gives me the total in g2:g10 where 1 shows up in
both e2:e10 & h2:h10 ... I was looking for it to add all the numbers in g2:g10 that has a 1 in e2:e10 & also h2:h10: example: col e col h col g 1 2 20 3 1 40 6 5 60 7 8 80 I would like it to come back with a total of 60 .. -- Jackie "Toppers" wrote: Jackie, try: =SUMPRODUCT(--(E2:E10=1),--(H2:H10=1),--(G2:G10)) "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
thanks .. but I have about 30000 rows actually & I was hoping to get it to
sumif & give me 1 total without having to copy the formula down .... I can get the sumif to work if I only give it the one critiera (=sumif(e2:e10,1,g2:g10) but not having it lokk into 2 columns & adding all my 1 for example ... -- Jackie "Rich Mcc" wrote: not sure if this is exactly what you want in col G =IF(AND(E1="1",H1="1"),"1","") then add up the totals in col G "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
Your original posting implied an AND condition not an OR:
=SUMPRODUCT(--(E2:E10=1)*--(G2:G10))+SUMPRODUCT(--(H2:H10=1)*--(G2:G10)) "Jackie" wrote: this is close - but it only gives me the total in g2:g10 where 1 shows up in both e2:e10 & h2:h10 ... I was looking for it to add all the numbers in g2:g10 that has a 1 in e2:e10 & also h2:h10: example: col e col h col g 1 2 20 3 1 40 6 5 60 7 8 80 I would like it to come back with a total of 60 .. -- Jackie "Toppers" wrote: Jackie, try: =SUMPRODUCT(--(E2:E10=1),--(H2:H10=1),--(G2:G10)) "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
sumif statement
I must have really been tired last night because this is EXACTLY what I need
it to do! Thanks so much for your help! -- Jackie "Toppers" wrote: Your original posting implied an AND condition not an OR: =SUMPRODUCT(--(E2:E10=1)*--(G2:G10))+SUMPRODUCT(--(H2:H10=1)*--(G2:G10)) "Jackie" wrote: this is close - but it only gives me the total in g2:g10 where 1 shows up in both e2:e10 & h2:h10 ... I was looking for it to add all the numbers in g2:g10 that has a 1 in e2:e10 & also h2:h10: example: col e col h col g 1 2 20 3 1 40 6 5 60 7 8 80 I would like it to come back with a total of 60 .. -- Jackie "Toppers" wrote: Jackie, try: =SUMPRODUCT(--(E2:E10=1),--(H2:H10=1),--(G2:G10)) "Jackie" wrote: I am begging for your help again ... I would like to add another if statement to the following statement but keep getting errors so obviously I am missing something: =sumif(e2:e10,"1",g2:g10)and if(h2:h10,"1") Basically what I am trying to do is sum a column g2:g10 only if both of the other columns are 1. I will also be changing it to e is 1 & h is 2 .... any ideas? .... -- Jackie |
All times are GMT +1. The time now is 06:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com