#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default sum grouping

If I have the following entries
Reason Time
Reason1 50
Reason3 45
Reason3 40
Reason2 35
Reason1 65

What function will give me the output?
Reason total time
Reason1 115
Reason2 35
Reason3 80

A pivot table would not work for me as I am trying to sum tables from
different tabs. Thank you for any help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 492
Default sum grouping

With the data in A1:5 and B1:5

=SUMPRODUCT(--($A$1:$A$5=A1),--($B$1:$B$5))

Drag it down to the end of the data list,
Regards,
Alan.
"KLock" wrote in message
...
If I have the following entries
Reason Time
Reason1 50
Reason3 45
Reason3 40
Reason2 35
Reason1 65

What function will give me the output?
Reason total time
Reason1 115
Reason2 35
Reason3 80

A pivot table would not work for me as I am trying to sum tables from
different tabs. Thank you for any help.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default sum grouping

Alan,

I was thinking along the lines of sumproduct. Just to better understand
what does the "--" do?

"Alan" wrote:

With the data in A1:5 and B1:5

=SUMPRODUCT(--($A$1:$A$5=A1),--($B$1:$B$5))

Drag it down to the end of the data list,
Regards,
Alan.
"KLock" wrote in message
...
If I have the following entries
Reason Time
Reason1 50
Reason3 45
Reason3 40
Reason2 35
Reason1 65

What function will give me the output?
Reason total time
Reason1 115
Reason2 35
Reason3 80

A pivot table would not work for me as I am trying to sum tables from
different tabs. Thank you for any help.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default sum grouping

Hi KLock
You could also use this : =SUMIF(A2:A6,"=Reason1",B2:B6) adjust range to your
needs.
HTH
John
"KLock" wrote in message
...
If I have the following entries
Reason Time
Reason1 50
Reason3 45
Reason3 40
Reason2 35
Reason1 65

What function will give me the output?
Reason total time
Reason1 115
Reason2 35
Reason3 80

A pivot table would not work for me as I am trying to sum tables from
different tabs. Thank you for any help.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default sum grouping

Hi KLock
The -- is called a Double Unary, it changes trues and falses
to 1's and 0's. Logic expression to numeric expression.
HTH
John
"John" wrote in message
...
Hi KLock
You could also use this : =SUMIF(A2:A6,"=Reason1",B2:B6) adjust range to your
needs.
HTH
John
"KLock" wrote in message
...
If I have the following entries
Reason Time
Reason1 50
Reason3 45
Reason3 40
Reason2 35
Reason1 65

What function will give me the output?
Reason total time
Reason1 115
Reason2 35
Reason3 80

A pivot table would not work for me as I am trying to sum tables from
different tabs. Thank you for any help.



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
grouping Pammy Excel Discussion (Misc queries) 1 March 29th 07 06:22 AM
Grouping Kay Excel Discussion (Misc queries) 1 January 21st 06 01:24 PM
Grouping Vitruvius Excel Worksheet Functions 1 August 16th 05 09:07 PM
Grouping Ray Excel Discussion (Misc queries) 0 March 2nd 05 04:51 PM
Grouping Lila Excel Discussion (Misc queries) 1 March 1st 05 03:33 AM


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