Count and Sum multiple values for a single entry

A

Arlen

I am trying to reconcile some worksheets that tracks each time a truck took a
trip and how many gallons it hauled.

Let's say on one spreadsheet, Truck 524 took 3 trips in one week. On a
separate sheet, column A will say 524, Column be will be number of trips
taken, Column C will be total number of gallons hauled.

In longhand, it would look like this:

TRUCK TRIPS GALLONS
524 4000
524 5000
524 6000

But in shorthand, I want it to look like this:
TRUCK TRIPS GALLONS
524 3 15000

Any suggestions? I've tried a few formulas from Microsoft's website, but
I'm getting value errors, even with their examples.

Thanks for any help.

Arlen
 
B

Bob Phillips

B2: = COUNTIF(Sheet1!A:A,524)
C2: =SUMIF(Sheet1!A:A,524,C:C)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
A

Arlen

PERFECT!!! Thank you.

Bob Phillips said:
B2: = COUNTIF(Sheet1!A:A,524)
C2: =SUMIF(Sheet1!A:A,524,C:C)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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