+ Reply to Thread
Results 1 to 6 of 6

Count each unique value in coloumn 'a' and sum values in coloumn 'b'

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    Hi I am new to vba.
    I want alittli help to all of you plz help me.
    I want to count each unique value in coloumn 'A' and sum respectly in coloumn 'B' and display this in same sheet an other place with unique values.

    I attached a sample sheet.
    plz plz plz plz help me.

    thanks alot in advance.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    Hi and welcome to the forum

    for the names...
    =IFERROR(INDEX($A$2:$A$11,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$11),0,0),0)),"")
    for the count...
    =COUNTIF($A$2:$A$11,D2)
    for the sum...
    =SUMIF($A$2:$A$11,D2,$B$2:$B$11)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-06-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    plz send me a macro file i dont know how make changes in
    sorry
    plz help me

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    You dont need a macro file for this, put the formulas where I have said, then copy them down...
    for the names...
    D2=IFERROR(INDEX($A$2:$A$11,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$11),0,0),0)),"")
    for the count...
    E2=COUNTIF($A$2:$A$11,D2)
    for the sum...
    F2=SUMIF($A$2:$A$11,D2,$B$2:$B$11)

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    Are you looking for a VBA solution?
    Otherwise formulas suggested by Ford are enough for what you are trying to do.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Registered User
    Join Date
    02-06-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count each unique value in coloumn 'a' and sum values in coloumn 'b'

    Thank you very much for this help it works very well but there is one problem system becomes very slow because i am having near about 1000 rows data.

    Now wt to do.
    plz help me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Look up 2 coloumn and retunr the multiple values
    By kiranmayi16 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2014, 02:29 PM
  2. Replies: 3
    Last Post: 07-08-2012, 05:25 AM
  3. counting duplicate values in a coloumn
    By macrogeek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-15-2011, 02:01 AM
  4. [SOLVED] count cells in a coloumn with letter x in it
    By sarg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-24-2005, 04:05 PM
  5. [SOLVED] How to make Unique coloumn in Excel sheet ?
    By V JHANJI in forum Excel General
    Replies: 2
    Last Post: 03-09-2005, 07:06 AM

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