Results 1 to 3 of 3

Thread: Summing rows where adjacent cell is the same

  1. #1

    Summing rows where adjacent cell is the same



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a question which on the face of it seems very simple but have not found a solution whilst searching this and many other forums.
    I am using Excel 2010 and have a list of customer numbers with associated revenue. In this list the same customer number will appear repeatedly for each sale. In reality the list is over 2000 lines long with a possibility of 300 different customers.
    CUSTOMER NUMBER # SALE $
    11111 10
    22222 20
    55222 32
    11111 20
    62626 43
    11111 11
    22222 30

    What I want is an output than sums the total per customer number, but cannot reference the customer number in any formulae as I will not know it in advance.
    The output should look like this

    CUSTOMER NUMBER TOTAL SALES PER CUSTOMER
    11111 41
    22222 50
    55222 32
    62626 43

    I have tried with a formulae that says something like =SUMIF(A1:A2000,"criteria",B1:B2000) where criteria = 11111, however what I want is a similar formulae that dynamically subtotals all the sales per customer without me having to know in advance the customer number. I want the formulae to learn the criteria from the given data.

    Any help is appreciated.

  2. #2
    Conjurer CheshireCat's Avatar
    Join Date
    Dec 2011
    Location
    Victoria, Canada
    Posts
    120
    Articles
    0
    Excel Version
    Microsoft Excel 2013
    You'll need two formulas for this. Note that the Customer IDs must be text (use an apostrophe if needed).
    Attached Files Attached Files

  3. #3
    Wow that was quick and yes these two formulaes look like they will work.
    The customer numbers are indeed text as extracted.
    Thanks again CheshireCat.

Tags for this Thread

Posting Permissions

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