Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mats W.
 
Posts: n/a
Default Sumif - double columns

I need to find a way to summarize the values from column C if the Column A
and B is the same as the criteria.

Example:

Col A ColB ColC
A C 10
B C 12
B B 15

The function whould then look for tehe criteria (B) in both column A and B
and give the result of 15. (Unfortnately the SumIf(A1:A10;"B";C1:C10) only
works for one "search" column). Grateful for any comments that can help me
with this issue! Thanks!
--
Mats W.
  #2   Report Post  
Bruno Campanini
 
Posts: n/a
Default Sumif - double columns

"Mats W." wrote in message
...
I need to find a way to summarize the values from column C if the Column A
and B is the same as the criteria.

Example:

Col A ColB ColC
A C 10
B C 12
B B 15

The function whould then look for tehe criteria (B) in both column A and B
and give the result of 15. (Unfortnately the SumIf(A1:A10;"B";C1:C10) only
works for one "search" column). Grateful for any comments that can help me
with this issue! Thanks!
--
Mats W.


=SUMPRODUCT(--(A1:A10=B1:B10),(C1:C10))

Ciao
Bruno


  #3   Report Post  
Roger Govier
 
Posts: n/a
Default Sumif - double columns

Hi Mats

Try
=SUMPRODUCT(--($A$1:$A$1000="B"),--($B$1:$B$1000="B"),$C$1:$C$1000)

Change ranges to suit, but ensure all ranges are of the same length.
Sumproduct will not take whole columns e.g.A:A

I would put the compared values B and B in cells e.g. G1 and H1
=SUMPRODUCT(--($A$1:$A$1000=G1),--($B$1:$B$1000=H1),$C$1:$C$1000)
then it is easy to obtain the values for other combinations without
modifying the formula.

Regards

Roger Govier


Mats W. wrote:
I need to find a way to summarize the values from column C if the Column A
and B is the same as the criteria.

Example:

Col A ColB ColC
A C 10
B C 12
B B 15

The function whould then look for tehe criteria (B) in both column A and B
and give the result of 15. (Unfortnately the SumIf(A1:A10;"B";C1:C10) only
works for one "search" column). Grateful for any comments that can help me
with this issue! Thanks!

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 using two columns in both Range and Criteria Gordon Excel Discussion (Misc queries) 5 June 29th 05 06:56 PM
Get Msg "Cannot shift objects off sheet" when hidng columns" Why? Steve Ball Excel Discussion (Misc queries) 2 June 27th 05 06:41 PM
Hiding columns and custom views problem Bettergains Excel Discussion (Misc queries) 2 April 12th 05 11:48 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
SUMIF and MULTIPLE DATA Brian Excel Discussion (Misc queries) 2 March 23rd 05 05:20 AM


All times are GMT +1. The time now is 02:19 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"