+ Reply to Thread
Results 1 to 4 of 4

sum values in "B" if repeating in "A"

  1. #1
    Registered User
    Join Date
    05-09-2007
    Posts
    3

    sum values in "B" if repeating in "A"

    I have 2 columns, “A” contains a name and “B” contains a value. Some of the names in “A” are repeated. If they are repeated in “A” I need the sum of there “B” values. So for example

    “A” “B”
    Bob 10
    Sam 4
    Bob 5
    Joe 6
    Fred 9

    I need to know that Bob is 15, Sam is 4, Joe is 6, and Fred is 9. There are about 3000 rows and the data will change in the future so doing it manually will be time consuming. Is there a function that can do this fo me?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    Hi,

    In your example,

    =SUMIF(A:A,"Bob",B:B)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    05-09-2007
    Posts
    3
    In the dataset there are thousands of values hundreads of which are probally repeating. I was looking for something that I wouldent have to manually seek out each repeating value. But thanks for the attempt.

  4. #4
    Registered User
    Join Date
    05-09-2007
    Posts
    3

    I Got It

    I got it. incase anyone else has the same question

    =IF((IF(COUNTIF($A$1:A1,A1)>1,COUNTIF($A1:A$1,A1),0))=0,SUMIF(A:A,A1,B:B),0)

+ 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