Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sumif or Sumproduct?

I simply can't figure this out...

I have multiple locations that I need to find specific criteria and sum:

A B C
D
LOCATION DESCRIPTION1 DESCRIPTION2 AMOUNT
------------- ----------------- ----------------- ------------
1 MC blank
$50
1 PURCHASE MC $20
1 AMEX blank
$10
5 AMEX blank $25
7 PURCHASE VISA $75
7 VISA blank
$100

For example:
I want to find to total $ for location 1 with description of MC in either
column B or C. So this example would total $70.
Help?
Thank you!!!
--
-A
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Sumif or Sumproduct?

Hi,

Here is one way

=SUMPRODUCT((A1:A6=1)*(B1:C6="MC")*D1:D6)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"alarson01" wrote:

I simply can't figure this out...

I have multiple locations that I need to find specific criteria and sum:

A B C
D
LOCATION DESCRIPTION1 DESCRIPTION2 AMOUNT
------------- ----------------- ----------------- ------------
1 MC blank
$50
1 PURCHASE MC $20
1 AMEX blank
$10
5 AMEX blank $25
7 PURCHASE VISA $75
7 VISA blank
$100

For example:
I want to find to total $ for location 1 with description of MC in either
column B or C. So this example would total $70.
Help?
Thank you!!!
--
-A

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Sumif or Sumproduct?

I tried it and now I get a #VALUE! error.
Let's complicate the issue a little more....

The description in either column can include part of the word or all (AMEX
or AM).
Also, I have two $ amount columns; one for debits, one for credits...

Help? :)
--
-A


"Shane Devenshire" wrote:

Hi,

Here is one way

=SUMPRODUCT((A1:A6=1)*(B1:C6="MC")*D1:D6)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"alarson01" wrote:

I simply can't figure this out...

I have multiple locations that I need to find specific criteria and sum:

A B C
D
LOCATION DESCRIPTION1 DESCRIPTION2 AMOUNT
------------- ----------------- ----------------- ------------
1 MC blank
$50
1 PURCHASE MC $20
1 AMEX blank
$10
5 AMEX blank $25
7 PURCHASE VISA $75
7 VISA blank
$100

For example:
I want to find to total $ for location 1 with description of MC in either
column B or C. So this example would total $70.
Help?
Thank you!!!
--
-A

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 117
Default Sumif or Sumproduct?

Hi,

Here is an excelent source of information on SUMPRODUCT
http://xldynamic.com/source/xld.SUMPRODUCT.html
I am but a pauper in a sea of experts here and it took me a while to gain an
understanding of this function but eventually some of the concepts and
applications started to click. I would recommend investing some time at the
site above. One thing that helped me was to build the formula using the
"Insert Fuction" feature (click on the "fx" on the formula bar). You can see
the immediate results as you build each array.
If Debit is column D and Credit is column E:
This will return the amount of debits where Location = 1 and "MC" is found
in column B or C
=SUMPRODUCT(--(A2:A7=1),(B2:B7="MC")+(C2:C7="MC"),D2:D7)

This will return the amount of debits less credits where Location = 1 and
"MC" is found in column B or C.
=SUMPRODUCT(((A2:A7=1)*((B2:B7="MC")+(C2:C7="MC")) *D2:D7)-(A2:A7=1)*((B2:B7="MC")+(C2:C7="MC"))*E2:E7)

This will return the amount of debits less credits where Location = 1 and
"AM" are the first two characters in column B or C.
=SUMPRODUCT(((A2:A7=1)*((LEFT(B2:B7,2)="AM")+(LEFT (C2:C7,2)="AM"))*D2:D7)-(A2:A7=1)*((LEFT(B2:B7,2)="AM")+(LEFT(C2:C7,2)="AM "))*E2:E7)

Best wishes
Dave

"alarson01" wrote in message
...
I tried it and now I get a #VALUE! error.
Let's complicate the issue a little more....

The description in either column can include part of the word or all (AMEX
or AM).
Also, I have two $ amount columns; one for debits, one for credits...

Help? :)
--
-A


"Shane Devenshire" wrote:

Hi,

Here is one way

=SUMPRODUCT((A1:A6=1)*(B1:C6="MC")*D1:D6)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"alarson01" wrote:

I simply can't figure this out...

I have multiple locations that I need to find specific criteria and
sum:

A B C
D
LOCATION DESCRIPTION1 DESCRIPTION2 AMOUNT


------ ----------------- ----------------- ------------
1 MC blank
$50
1 PURCHASE MC
$20
1 AMEX blank
$10
5 AMEX blank
$25
7 PURCHASE VISA
$75
7 VISA blank
$100

For example:
I want to find to total $ for location 1 with description of MC in
either
column B or C. So this example would total $70.
Help?
Thank you!!!
--
-A



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 and sumif Boris75 Excel Worksheet Functions 6 August 13th 08 04:24 PM
SumIf or SumProduct Blddrgn700 Excel Discussion (Misc queries) 2 June 27th 08 08:10 AM
SUMIF vs SUMPRODUCT Tim Richards Excel Worksheet Functions 2 March 14th 08 06:02 PM
HELP !!! SUMIF or SUMPRODUCT Soultek Excel Discussion (Misc queries) 3 March 21st 07 03:30 PM
sumif and sumproduct together tina Excel Discussion (Misc queries) 3 March 8th 06 01:39 PM


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