#1   Report Post  
Posted to microsoft.public.excel.misc
Jackie
 
Posts: n/a
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Rich Mcc
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Rich Mcc
 
Posts: n/a
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
Jackie
 
Posts: n/a
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.misc
Jackie
 
Posts: n/a
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.misc
Jackie
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif statement JR573PUTT Excel Discussion (Misc queries) 5 February 17th 06 04:01 PM
Nested SumIf statement jlhart76 Excel Worksheet Functions 7 January 18th 06 04:27 PM
my sumif statement brings back mutiple answers, how do I fix it? graham Excel Worksheet Functions 2 November 15th 05 08:14 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
sumif statement Ted Metro Excel Worksheet Functions 1 January 7th 05 04:18 PM


All times are GMT +1. The time now is 04:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"