#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Help

I have two columns Company Name and # of Hours.

Name # of hours
Company A 8
Company A 10
Company B 5
Company A 2
Company B 3

I Need to Sum Company A and B Hours, I tried SumProduct, but I Can't Get
it...

Help...Thanks in Advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Help

With your posted data in A1:B6

Try this:

D2: Company A
D3: Company B

This formula returns the total for the company entered in Col_D :
E2: =SUMIF($A$2:$A$6,D2,$B$2:$B$6)
Copy E2 into E3

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"O...." wrote in message
...
I have two columns Company Name and # of Hours.

Name # of hours
Company A 8
Company A 10
Company B 5
Company A 2
Company B 3

I Need to Sum Company A and B Hours, I tried SumProduct, but I Can't Get
it...

Help...Thanks in Advance




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Help

hi
sumif???
=sumif(A1:A10,"Company A",B1:B10)

you would need a sumif for each company.

regards
FSt1

"O...." wrote:

I have two columns Company Name and # of Hours.

Name # of hours
Company A 8
Company A 10
Company B 5
Company A 2
Company B 3

I Need to Sum Company A and B Hours, I tried SumProduct, but I Can't Get
it...

Help...Thanks in Advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Help

Try

=SUMPRODUCT((A1:A5="Company A")*(B1:B5))


Mike

"O...." wrote:

I have two columns Company Name and # of Hours.

Name # of hours
Company A 8
Company A 10
Company B 5
Company A 2
Company B 3

I Need to Sum Company A and B Hours, I tried SumProduct, but I Can't Get
it...

Help...Thanks in Advance

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default Help

Assuming your database is A1..B100...

....for Company A,
=SUMPRODUCT(($A$2:$A$100="Company A")*($B$2:$B$100))

....and for Company B
=SUMPRODUCT(($A$2:$A$100="Company B")*($B$2:$B$100))

When I do problems like this in real life, I usually make a list of what I'm
trying to calculate for in a separate area of the worksheet and use cell
references in the formulas. So in your example, I might use columns D & E,
list all the companies starting in D2, then in E2, write my formula as

=SUMPRODUCT(($A$2:$A$100=D2)*($B$2:$B$100))

D E
1 Name Total Hrs
2 Company A
3 Company B

It is then a simple task to copy this formula from E2 down to the row of the
last company.

"O...." wrote:

I have two columns Company Name and # of Hours.

Name # of hours
Company A 8
Company A 10
Company B 5
Company A 2
Company B 3

I Need to Sum Company A and B Hours, I tried SumProduct, but I Can't Get
it...

Help...Thanks in Advance



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



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