+ Reply to Thread
Results 1 to 5 of 5

Count the number of names appearing in a certain cell

  1. #1
    Registered User
    Join Date
    03-04-2020
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    3

    Post Count the number of names appearing in a certain cell

    Hi everyone!

    New to excel VBA and I am a newly appointed minute taker for my department meeting.

    I have a sheet with an activeX control - command button that generate names randomly based on the list given.
    The name generated will appear on my Sheet2 (Nominee) cell B2.
    The name generated will also be randomized and can be duplicated.

    I have difficulty trying to execute the command below.
    I will like to count the number of times the name appear in B2 every time I clicked the command button.
    The counter will not reset if I clicked the command button.
    The counter will increase +1 for every duplicated name after I clicked the command button.

    Under selection, how should I go about when the counter shows "3" a MsgBox ("TheNameBesideTheCounterBox") will appear?

    Thanks for helping me figure this out!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Count the number of names appearing in a certain cell

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

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Count the number of names appearing in a certain cell

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 03-04-2020 at 11:01 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Registered User
    Join Date
    03-04-2020
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Count the number of names appearing in a certain cell

    Thanks ikboy! Works like a charm! I'll study the code and hopefully understand it

  5. #5
    Registered User
    Join Date
    03-04-2020
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Count the number of names appearing in a certain cell

    Wow, your code is much more direct by applying it onto the command button itself. Thanks! I'll study this as well! Though I will be disheartened when I see application.worksheetfunction, etc.

+ 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. Replies: 18
    Last Post: 02-13-2019, 07:55 AM
  2. Replies: 2
    Last Post: 04-14-2016, 03:50 AM
  3. [SOLVED] Count the number of names in a list(column) without the first cell
    By Diannewb52 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2015, 12:28 AM
  4. [SOLVED] Count the number of shared names by other groups
    By alice2011 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-28-2014, 07:41 PM
  5. [SOLVED] Macro for appearing only the active names
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2013, 08:11 AM
  6. [SOLVED] If names appears in range count and enter number in another cell. Split into categories
    By marsham in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2013, 06:18 PM
  7. Count Number of Unique Names in a List
    By acewriter63 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-09-2012, 09:12 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