Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Sumif based on value in cell

I am trying to add values in one column, if the second column matches the
criteria. This is what I have written and I know this is wrong. Can anyone
please help.

SUMIF(B:B,"<=AC10 and =AD10",C:C)

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Sumif based on value in cell

Your problem is you are checking for two conditions, not one. Sumif can
handle only one condition.

If you have Excel 2007, you can use:
=sumifs(c:c,b:b,"<="&ac10,b:b,"="&ad10)

If not, you can use Sumproduct, but you can't use an entire column.
Something like:
=sumproduct(--(b2:b1000<=ac10),--(b2:b1000=ad10),c2:c1000)

Regards,
Fred.

"Jane" wrote in message
...
I am trying to add values in one column, if the second column matches the
criteria. This is what I have written and I know this is wrong. Can anyone
please help.

SUMIF(B:B,"<=AC10 and =AD10",C:C)

Thank you


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Sumif based on value in cell

Thank you Fred.

This is what I have and the result I get is 0, which is not correct. Do you
know what I am doing wrong.


SUMPRODUCT((B8:B152<=AD10),(B8:B152=AC10),C8:C152 )


Thanks again


"Fred Smith" wrote:

Your problem is you are checking for two conditions, not one. Sumif can
handle only one condition.

If you have Excel 2007, you can use:
=sumifs(c:c,b:b,"<="&ac10,b:b,"="&ad10)

If not, you can use Sumproduct, but you can't use an entire column.
Something like:
=sumproduct(--(b2:b1000<=ac10),--(b2:b1000=ad10),c2:c1000)

Regards,
Fred.

"Jane" wrote in message
...
I am trying to add values in one column, if the second column matches the
criteria. This is what I have written and I know this is wrong. Can anyone
please help.

SUMIF(B:B,"<=AC10 and =AD10",C:C)

Thank you



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Sumif based on value in cell

Fred,

From Mike's post above, I figured the error... Thanks.

Jane




"Jane" wrote:

Thank you Fred.

This is what I have and the result I get is 0, which is not correct. Do you
know what I am doing wrong.


SUMPRODUCT((B8:B152<=AD10),(B8:B152=AC10),C8:C152 )


Thanks again


"Fred Smith" wrote:

Your problem is you are checking for two conditions, not one. Sumif can
handle only one condition.

If you have Excel 2007, you can use:
=sumifs(c:c,b:b,"<="&ac10,b:b,"="&ad10)

If not, you can use Sumproduct, but you can't use an entire column.
Something like:
=sumproduct(--(b2:b1000<=ac10),--(b2:b1000=ad10),c2:c1000)

Regards,
Fred.

"Jane" wrote in message
...
I am trying to add values in one column, if the second column matches the
criteria. This is what I have written and I know this is wrong. Can anyone
please help.

SUMIF(B:B,"<=AC10 and =AD10",C:C)

Thank you



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Sumif based on value in cell

I don't see Mike's post, but from mine you'll notice dashes (--) in my
formula which aren't in yours. It's a simple matter of not copying the
formula properly.

Regards,
Fred.

"Jane" wrote in message
...
Fred,

From Mike's post above, I figured the error... Thanks.

Jane




"Jane" wrote:

Thank you Fred.

This is what I have and the result I get is 0, which is not correct. Do
you
know what I am doing wrong.


SUMPRODUCT((B8:B152<=AD10),(B8:B152=AC10),C8:C152 )


Thanks again


"Fred Smith" wrote:

Your problem is you are checking for two conditions, not one. Sumif can
handle only one condition.

If you have Excel 2007, you can use:
=sumifs(c:c,b:b,"<="&ac10,b:b,"="&ad10)

If not, you can use Sumproduct, but you can't use an entire column.
Something like:
=sumproduct(--(b2:b1000<=ac10),--(b2:b1000=ad10),c2:c1000)

Regards,
Fred.

"Jane" wrote in message
...
I am trying to add values in one column, if the second column matches
the
criteria. This is what I have written and I know this is wrong. Can
anyone
please help.

SUMIF(B:B,"<=AC10 and =AD10",C:C)

Thank you



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 based on date Harry Excel Discussion (Misc queries) 3 April 12th 09 06:03 PM
SUMIF Based On Cell Color Mike Excel Discussion (Misc queries) 1 August 18th 08 11:02 PM
sumif based on cell comparison in excel Bunty Excel Worksheet Functions 2 November 13th 06 04:38 PM
sumif-add amount to another cell based on two criteria gabrielinlompoc Excel Discussion (Misc queries) 0 February 10th 06 01:22 AM
SumIf based on two criteria Mark Williams Excel Worksheet Functions 1 June 22nd 05 06:43 PM


All times are GMT +1. The time now is 12:59 PM.

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

About Us

"It's about Microsoft Excel"