+ Reply to Thread
Results 1 to 3 of 3

Summing distinct rows in same cell

  1. #1
    Registered User
    Join Date
    08-12-2006
    Posts
    9

    Summing distinct rows in same cell

    Sorry for the bad title I'm not sure hte best way to sum up this issue.

    Fruit Price Total
    Apples 0.69 40
    Bananas 0.34 38
    Lemons 0.55 15
    Oranges 0.25 25
    Apples 0.5 10
    Pears 0.59 40
    Almonds 2.8 10
    Cashews 3.55 16
    Peanuts 1.25 20
    Walnuts 1.75 12
    Apples 0.5 5

    Given the data above I'm trying to sum the totals for only the Apple rows. So basically I need to search the Fruit column find the rows that have "Apples" and then sum their corresponding Totals, giving me 55. I've been playing with this for hours with Lookups and Indexes but am not really getting anywhere. Also, I cannot use any VBA as the client will not run any files with Macros. Thanks in advance for any assistance.
    Greg

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Theres a few ways

    Here's a few of them

    1) You could use a pivot table

    2) =SUMPRODUCT(--(A2:A12="apples")*(C2:C12))

    3) =SUMIF(A2:A12,"Apples",C2:C12)

    VBA Noob

  3. #3
    Registered User
    Join Date
    08-12-2006
    Posts
    9

    Answer

    That did it thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1