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 Complex conditions using SUMIF

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Complex conditions using SUMIF

Hi,

Try this

=SUMPRODUCT((B1:B5="A")*(C1:C50)*(C1:C5))

or if you want to include the employee

=SUMPRODUCT((A1:A5="EMP #1")*(B1:B5="A")*(C1:C50)*(C1:C5))


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Complex conditions using SUMIF

SUMPRODUCT is the key to using multiple conditions.

=SUMPRODUCT(--(B2:B10="A"),--(C2:C100),C2:C10)

Note that you can add another criteria to check by Employee, if you wanted:
=SUMPRODUCT(--(A2:A10="Emp #1"),--(B2:B10="A"),--(C2:C100),C2:C10)

Just make sure that all the array sizes withing SUMPRODUCT are the same size.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Complex conditions using SUMIF

Thanks so much...................can I use NOT EQUAL TO? Ex:

=SUMPRODUCT((B1:B5<"A")*(C1:C50)*(C1:C5))

I actually had more than 2 statuses.....I wanted a sum for all T's; then a
sum for everything else.

The < is only returning a value of zero.......which I don't think is right.

--
~~Boo


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((B1:B5="A")*(C1:C50)*(C1:C5))

or if you want to include the employee

=SUMPRODUCT((A1:A5="EMP #1")*(B1:B5="A")*(C1:C50)*(C1:C5))


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Complex conditions using SUMIF

I'm a goofball...........had a syntax error..........it worked
PERFECTLY.......thnx a bunch.
--
~~Boo


"Booweezie" wrote:

Thanks so much...................can I use NOT EQUAL TO? Ex:

=SUMPRODUCT((B1:B5<"A")*(C1:C50)*(C1:C5))

I actually had more than 2 statuses.....I wanted a sum for all T's; then a
sum for everything else.

The < is only returning a value of zero.......which I don't think is right.

--
~~Boo


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((B1:B5="A")*(C1:C50)*(C1:C5))

or if you want to include the employee

=SUMPRODUCT((A1:A5="EMP #1")*(B1:B5="A")*(C1:C50)*(C1:C5))


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Complex conditions using SUMIF

is there a COUNTPRODUCT function? I now find that I need to count the number
of occurrences that were summed in my example.
--
~~Boo


"Luke M" wrote:

SUMPRODUCT is the key to using multiple conditions.

=SUMPRODUCT(--(B2:B10="A"),--(C2:C100),C2:C10)

Note that you can add another criteria to check by Employee, if you wanted:
=SUMPRODUCT(--(A2:A10="Emp #1"),--(B2:B10="A"),--(C2:C100),C2:C10)

Just make sure that all the array sizes withing SUMPRODUCT are the same size.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Complex conditions using SUMIF

is there a COUNTPRODUCT function? I now find that I need to count the
number
of occurrences that were summed in my example.



=SUMPRODUCT((B1:B5="A")*(C1:C50))

should do that


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Booweezie" wrote:

is there a COUNTPRODUCT function? I now find that I need to count the number
of occurrences that were summed in my example.
--
~~Boo


"Luke M" wrote:

SUMPRODUCT is the key to using multiple conditions.

=SUMPRODUCT(--(B2:B10="A"),--(C2:C100),C2:C10)

Note that you can add another criteria to check by Employee, if you wanted:
=SUMPRODUCT(--(A2:A10="Emp #1"),--(B2:B10="A"),--(C2:C100),C2:C10)

Just make sure that all the array sizes withing SUMPRODUCT are the same size.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Complex conditions using SUMIF

Booweezie wrote:
is there a COUNTPRODUCT function? I now find that I need to count the number
of occurrences that were summed in my example.


Look he

http://www.contextures.com/xlFunctio...tml#SumProduct
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default Complex conditions using SUMIF

Complex conditions using SUMIF

As a side note, Sumproduct is the most popular, but Excel 2007 has the
newer "SumIfs" function.
I prefer to use the heading row for Named Ranges.
For Example...

=SUMIFS(Amount, Status, "A", Amount, "0")

or

=SUMIFS(Amount, Status, "<A", Amount, "0")


= = = = = = =
HTH :)
Dana DeLouis

On 2/15/2010 12:26 PM, Booweezie wrote:
Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.



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
complex color fill conditions- if statements or complex formula? lilly8008 Excel Discussion (Misc queries) 1 December 18th 09 04:57 AM
Complex VBA Sumif Jeff Excel Discussion (Misc queries) 4 May 17th 08 05:36 PM
complex SUMIF shaqil Excel Worksheet Functions 3 November 12th 07 02:14 PM
need help COMPLEX SUM /w conditions Seller Excel Worksheet Functions 1 November 24th 04 07:22 AM
need help COMPLEX SUM /w conditions Seller Excel Worksheet Functions 0 November 24th 04 01:02 AM


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