Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default SumProduct If?

Hi. I need to do a sumproduct on 2 columns (B & C). But, I only want to
include the rows where the contents of column A are "H". So in laymans
terms, scan column A, identify the rows with "H" in column A, and then
perform a sumproduct on those specific rows. Possible? Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default SumProduct If?

Hi
If you name the three columns "Text", "DataB" and "DataC" then in a
blank cell type

= sum(if(Text = "H", DataB*DataC,0))

and enter as an array formula using Ctrl+Shift+Enter.

To name a range of cells, highlight it then do Insert, Name,
Define...and give it a name.

You could use the SumProduct function and SubTotal function too, but I
find this "sum if" very flexible if you have several conditions.

regards
Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SumProduct If?

steph -

add a 3rd item to the sumproduct formula like:

=sumproduct((A10:A100="H")*1,B10:B100,C10:C100)

if A10 .. A100 < "H" then the first item evaluates to zero and will
not impact the sum

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default SumProduct If?

=sumproduct(--(a1:a99="h"),b1:b99,c1:C99)


Steph wrote:

Hi. I need to do a sumproduct on 2 columns (B & C). But, I only want to
include the rows where the contents of column A are "H". So in laymans
terms, scan column A, identify the rows with "H" in column A, and then
perform a sumproduct on those specific rows. Possible? Thanks!


--

Dave Peterson
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
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
SUMPRODUCT with OR? pgarcia Excel Discussion (Misc queries) 4 April 9th 09 10:25 PM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
#VALUE! from SUMPRODUCT gte New Users to Excel 8 January 15th 08 06:16 PM
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM


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