how to sum one column using a second column as a condition

A

Alex

I have a budget management with rows indicating employee "time
entries". The sheet has columns:

date
client
project
employee
billed time (min)
description of work
charge type

Underneath the "time entries" is a "summary section" with columns

charge type
total min

their are 6 charge types

em
bar
bas
sam
saa
sad


How can I make the "total time" field in the summary section
automatically calculate the total minutes for each of the 6 charge
types given?

ie. if I have:

date client project employee billed time (min) description charge type
09/26/06 client 1 project 1 smith 30 description of some task EM
10/19/06 client 2 project 2 smith 30 description of some task EM
09/26/06 client 1 project 1 smith 100 description of some task BAR
10/19/06 client 5 some project smith 100 description of some task BAR
09/26/06 client 6 some project jones 100 description of some task BAR
10/19/06 client 5 some project smith 45 description of some task BAS
09/26/06 client 2 some project smith 45 description of some task BAS
10/19/06 client 3 some project davis 60 description of some task SAM
09/26/06 client 3 some project smith 60 description of some task SAM
10/19/06 client 4 some project smith 60 description of some task SAM
10/19/06 client 7 some project davis 60 description of some task SAA
09/26/06 client 8 some project smith 30 description of some task SAA
10/19/06 client 10 some project smith 15 description of some task SAA
10/19/06 client 3 some project davis 10 description of some task SAD
09/26/06 client 2 some project smith 25 description of some task SAD
10/19/06 client 2 some project smith 30 description of some task SAD

the summary will show :

charge total min
em 60.00
bar 300.00
bas 90.00
sam 180.00
saa 45.00
sad 65.00


I am hoping that there is some way to associate some VBA code with each
"total min" fields (for each "charge type") that will automatically
find time entry rows with a given charge type, total them all up and
then show the total in the summary.

I appreciate any help you can provide.

Thanks,
Alex
 
B

Bob Phillips

=SUMIF(G:G,"em",E:E)

etc.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
A

Alex

thank you! it works perfectly.

-alex


Bob said:
=SUMIF(G:G,"em",E:E)

etc.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top