Counting the items

T

Tyrone Lopez

Is there a formula to count the number of items in a list and its
corresponding sum value, eg

Item $
apple 1.00
apple 2.00
orange 1.50

For the above, the result should be apple=2 items, totalling $3.00.
Orange+ ! item totalling $1.50. :)
 
B

Biff

Hi!

This table being in the range A1:B4. A1 and B1 are headers. Data in A2:B4.
Item $
apple 1.00
apple 2.00
orange 1.50

...........D............E..............F
1......Item......Count.........Sum
2......Apple............................
3.....Orange...........................

Enter this formula in E2:

=COUNTIF(A$2:A$4,D2)

Enter this formula in F2:

=SUMIF(A$2:A$4,D2,B$2:B$4)

Select both E2 and F2 then copy down as needed.

Biff

"Tyrone Lopez" <[email protected]>
wrote in message
 
T

Tyrone Lopez

Hi guys,
Thanks a million, you've made my day. I was using the formulas but did
not know what to do until your replies.
 

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