#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default sum product if

i need a formula to sum a product of the info in two columns based on meeting
the if criteria. i have tried to use a combination of the SUMPRODUCT AND
SUMIF without success. For example
Column 1 Column 2 Column 3
State Hours Rate
PA 2 $50
PA 1 $10
NJ 4 $20
MD 3 $40
NJ 1 $10
PA 2 $10

I would like a formula to put in a cell to automatically look down column 1
("state") and sum the products of the "hours" and "rates" for a particular
state. PA: 2*$50 + 1*$10 + 2*$10 = $130.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default sum product if

With data in A1:C7, put this function in cell E2:
=SUMPRODUCT(--(A2:A7="PA"),(B2:B7)*(C2:C7))

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"r2rcode" wrote:

i need a formula to sum a product of the info in two columns based on meeting
the if criteria. i have tried to use a combination of the SUMPRODUCT AND
SUMIF without success. For example
Column 1 Column 2 Column 3
State Hours Rate
PA 2 $50
PA 1 $10
NJ 4 $20
MD 3 $40
NJ 1 $10
PA 2 $10

I would like a formula to put in a cell to automatically look down column 1
("state") and sum the products of the "hours" and "rates" for a particular
state. PA: 2*$50 + 1*$10 + 2*$10 = $130.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default sum product if

perfect... thanks for your help

"ryguy7272" wrote:

With data in A1:C7, put this function in cell E2:
=SUMPRODUCT(--(A2:A7="PA"),(B2:B7)*(C2:C7))

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"r2rcode" wrote:

i need a formula to sum a product of the info in two columns based on meeting
the if criteria. i have tried to use a combination of the SUMPRODUCT AND
SUMIF without success. For example
Column 1 Column 2 Column 3
State Hours Rate
PA 2 $50
PA 1 $10
NJ 4 $20
MD 3 $40
NJ 1 $10
PA 2 $10

I would like a formula to put in a cell to automatically look down column 1
("state") and sum the products of the "hours" and "rates" for a particular
state. PA: 2*$50 + 1*$10 + 2*$10 = $130.

  #4   Report Post  
Junior Member
 
Posts: 1
Default

Hi,

How would I include another condition into this formula?

Essentially, I want to include (B:B="<Total") into this formula:

=SUMPRODUCT(--(A:A=A1),(C:C)*(D:D))

I tried putting in an AND statement, but that didn't seem to work..

I hope this makes sense!



Quote:
Originally Posted by ryguy7272 View Post
With data in A1:C7, put this function in cell E2:
=SUMPRODUCT(--(A2:A7="PA"),(B2:B7)*(C2:C7))

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"r2rcode" wrote:

i need a formula to sum a product of the info in two columns based on meeting
the if criteria. i have tried to use a combination of the SUMPRODUCT AND
SUMIF without success. For example
Column 1 Column 2 Column 3
State Hours Rate
PA 2 $50
PA 1 $10
NJ 4 $20
MD 3 $40
NJ 1 $10
PA 2 $10

I would like a formula to put in a cell to automatically look down column 1
("state") and sum the products of the "hours" and "rates" for a particular
state. PA: 2*$50 + 1*$10 + 2*$10 = $130.
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
Product Code and Product Description setup Nastyashman Excel Worksheet Functions 4 July 6th 09 05:48 PM
I need a product key for my Trail product, 2007 Microsoft Office s sltchsyi Setting up and Configuration of Excel 0 May 4th 09 01:32 AM
Product ID EJ Jacques[_2_] Excel Discussion (Misc queries) 1 June 26th 08 12:20 PM
PRODUCT KEY THOMSMART Excel Discussion (Misc queries) 1 May 2nd 07 06:59 AM
sum product ceemo Excel Worksheet Functions 2 March 9th 06 04:35 PM


All times are GMT +1. The time now is 07:32 PM.

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"