Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Susan F.
 
Posts: n/a
Default What is the best method for summing values where you want 2 value.

An example of this is: If F2=A1:A5, and G1=B1:B5, then sum values. I have
tried an array formula, but it does not return any results. Below is the
formula I was trying. I have used Booleon format also, but it is hit and miss.
=SUM(IF(AND($A3=Raw!$A$2:$A$297,Summary!$C$1=Raw!$ C$2:$C$297),Raw!$E$2:$E$297,0))
  #2   Report Post  
Tom Ogilvy
 
Posts: n/a
Default

=Sumproduct(--(A1:A5=F2),--(B1:B5=G1),E1:E5)

would sum values in column E where in the same row, the column A value
equaled the value in F2 and the column B value equaled the value in G1

--
Regards,
Tom Ogilvy


"Susan F." <Susan wrote in message
...
An example of this is: If F2=A1:A5, and G1=B1:B5, then sum values. I have
tried an array formula, but it does not return any results. Below is the
formula I was trying. I have used Booleon format also, but it is hit and

miss.

=SUM(IF(AND($A3=Raw!$A$2:$A$297,Summary!$C$1=Raw!$ C$2:$C$297),Raw!$E$2:$E$29
7,0))


  #3   Report Post  
Dave O
 
Posts: n/a
Default

Here's one way, assuming the values to sum are in C1:C5:
=SUMPRODUCT(--(A1:A5=F2),--(B1:B5=G1),C1:C5)

This is effectively an expanded SUMIF formula that allows multiple IF
comparisons. The "--" in the formula are double unary operators that
cause Excel to evaluate the comparisons as a 0 if false and a 1 if
true. For each row, the Sumproduct evaluates the true / false 1/0 and
multiplies by the value in the "to be summed" column. If one or more
of the comparisons is false, the formula multiplies by zero, augmenting
the overall sum by zero since 0 times any number is zero.

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
Zero values in a log chart Joelle_Smith Charts and Charting in Excel 2 May 8th 23 03:42 AM
How sum values in column B using values in column A as the conditi oldgrayelf Excel Worksheet Functions 5 February 4th 05 09:03 PM
Second serie doesn't use X-as values JackRnl Charts and Charting in Excel 1 January 20th 05 01:04 AM
Count number of Unique values Alan Excel Worksheet Functions 4 January 6th 05 08:05 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM


All times are GMT +1. The time now is 05:23 AM.

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"