+ Reply to Thread
Results 1 to 9 of 9

count the duplicate values

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2003
    Posts
    20

    count the duplicate values

    sir ,
    i want to count the duplicate values with condition that thier anamoly(coloumn C) is fix leaving out the variables and blanks (coloumn C)
    using macros preferably if loops (if possible)
    count.xls
    Last edited by macrogeek; 10-18-2011 at 05:35 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: count the duplicate values

    Do you mean you want to sum the values for 7151.035 (Blanking plate) and EPKS SRVR (R710), which are marked as "Fix"?

    If so you can use the formula =SUMIF(C2:C11,"fix",E2:E11)

  3. #3
    Registered User
    Join Date
    10-14-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: count the duplicate values

    some names they are certain entities,
    I dont want to sum them i WANT TO COUNT THE NO OF TIMES THEY REPEATED ITSELF IN COLOUMN 1
    I want to do it in macros and IF loop possoble so tha there is a provsion for counting only "Fix" (Coloumn C )values .
    Last edited by macrogeek; 10-17-2011 at 11:07 AM.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: count the duplicate values

    A SUMIF or COUNTIF function will only count or sum matching values. Doing the same thing in a loop inside a macro would be much slower. Is there a reason it needs to be done in a macro?

  5. #5
    Registered User
    Join Date
    10-14-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: count the duplicate values

    yES I HAVE TO PRGRAM SOMETHING IT IS JUST ONE CHUNK OF iT.

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: count the duplicate values

    I'm still not sure exactly what you're trying to do, but if you really want to do it programmatically you could try:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-14-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: count the duplicate values

    In coloumn A there are entities that are repeated,
    In coloumn D there are Unique values,
    I want to count the No. of Times these Unique values present in coloumn A
    With the condition that colomn C should have fix in the respective Row.
    Whichever unique value has fix in coloumn C we Have to count that(duplicate values in coloumn A).

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: count the duplicate values

    How about this ... I've modified the code in your attachment to:

    Please Login or Register  to view this content.

    That should do the job.

  9. #9
    Registered User
    Join Date
    10-14-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: count the duplicate values

    Thanks.
    I was just trying that thing but i dont know there was some conflict between for and if anyways.
    You made it look easier , So 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