A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding digits in a column based on data in a separate column



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 09:47 PM posted to microsoft.public.excel.misc
adriver
external usenet poster
 
Posts: 3
Default Adding digits in a column based on data in a separate column

I am making a log for incoming documents, and need to add the number of days
each type of document takes to be processed. Example:

Task Type Days to Complete
Type AA 10
Type AA 12
Type BB 6
Type CC 10
Type AA 8

Is there a way to count how many total days all "Type AA" documents took?
I've been trying COUNTIF variations and I can't get anything working.

THanks!
  #3  
Old April 20th, 2010, 10:38 PM posted to microsoft.public.excel.misc
mike
external usenet poster
 
Posts: 3,942
Default Adding digits in a column based on data in a separate column

Assuming your AA = in Column =A, and Num of Days is in Column B.
=SUMPRODUCT(--(A1:A5="AA")*(B1:B5))

"adriver" wrote:

I am making a log for incoming documents, and need to add the number of days
each type of document takes to be processed. Example:

Task Type Days to Complete
Type AA 10
Type AA 12
Type BB 6
Type CC 10
Type AA 8

Is there a way to count how many total days all "Type AA" documents took?
I've been trying COUNTIF variations and I can't get anything working.

THanks!

  #4  
Old April 20th, 2010, 10:52 PM posted to microsoft.public.excel.misc
adriver
external usenet poster
 
Posts: 3
Default Adding digits in a column based on data in a separate column

Brilliant! I've never seen SUMPRODUCT before, but I dare say my life just
got a lot easier. Thanks!

"Mike" wrote:

Assuming your AA = in Column =A, and Num of Days is in Column B.
=SUMPRODUCT(--(A1:A5="AA")*(B1:B5))

"adriver" wrote:

I am making a log for incoming documents, and need to add the number of days
each type of document takes to be processed. Example:

Task Type Days to Complete
Type AA 10
Type AA 12
Type BB 6
Type CC 10
Type AA 8

Is there a way to count how many total days all "Type AA" documents took?
I've been trying COUNTIF variations and I can't get anything working.

THanks!

  #5  
Old April 21st, 2010, 12:41 AM posted to microsoft.public.excel.misc
JLatham
external usenet poster
 
Posts: 1,896
Default Adding digits in a column based on data in a separate column

SUMPRODUCT() is really great when you need to total things up by multiple
criteria. For example, lets say you had another column that held the
initials of the person doing one of the tasks:
Task Type Days to Complete Employee
Type AA 10 RJ
Type AA 12 JB
Type BB 6 JB
Type CC 10 RJ
Type AA 8 RJ
you could find out how many days to complete task AA for RJ:
=SUMPRODUCT(--($A$1:$A$5="Type AA"),--($C$1:$C$5="RJ"),($B$1:$B$5))
But when only one condition is needed for testing (as in your original
request), the solution that RagDyer provided using SUMIF() is more efficient.


"adriver" wrote:

Brilliant! I've never seen SUMPRODUCT before, but I dare say my life just
got a lot easier. Thanks!

"Mike" wrote:

Assuming your AA = in Column =A, and Num of Days is in Column B.
=SUMPRODUCT(--(A1:A5="AA")*(B1:B5))

"adriver" wrote:

I am making a log for incoming documents, and need to add the number of days
each type of document takes to be processed. Example:

Task Type Days to Complete
Type AA 10
Type AA 12
Type BB 6
Type CC 10
Type AA 8

Is there a way to count how many total days all "Type AA" documents took?
I've been trying COUNTIF variations and I can't get anything working.

THanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.