+ Reply to Thread
Results 1 to 7 of 7

Counting the number of matched cells and adding it to a different number...

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Counting the number of matched cells and adding it to a different number...

    Hi Guys,

    The macro I am trying to create should be fairly simple, I've started a macro but I can't figure out how to write it correctly.

    Basically, I need it to cycle through a list of names and match them to a list of names in a different sheet but count how many times the name appears in the sheet and then add this number to the original list on top of the number that already exists in the counter column.

    It's much easier to show in the file itself, please checkout the attached file.

    Also here is my bad and not working macro as I can't figure it out:

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Counting the number of matched cells and adding it to a different number...

    You may try this....
    Please Login or Register  to view this content.
    Does this work?
    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.

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Counting the number of matched cells and adding it to a different number...

    Wow, that works impressively fast. I'll try it in my main sheet when I'm home but I'm pretty sure that's perfect.

    Thanks for your help!

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Counting the number of matched cells and adding it to a different number...

    Try this:-
    Please Login or Register  to view this content.
    Regards Mick

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

    Re: Counting the number of matched cells and adding it to a different number...

    You're welcome. Thanks for the feedback as well.

    Well sometimes using worksheet functions in VBA is helpful rather than looping through cells.

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Counting the number of matched cells and adding it to a different number...

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Counting the number of matched cells and adding it to a different number...

    Three different versions, which ones best... how would I tell?

+ 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. Counting number of occurances matched with certain value
    By lucyscholz in forum Excel General
    Replies: 1
    Last Post: 08-31-2014, 06:07 PM
  2. [SOLVED] Number of cells that are not matched in other columns
    By fedfed in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2013, 01:02 PM
  3. Counting number of non-zero cells in a row
    By lovi in forum Excel General
    Replies: 4
    Last Post: 09-06-2011, 03:24 PM
  4. counting number of cells with same number
    By charlie44 in forum Excel General
    Replies: 9
    Last Post: 01-05-2007, 01:24 PM
  5. Counting the Number of Cells Containing
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 05:46 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