+ Reply to Thread
Results 1 to 6 of 6

count number of x on another sheet

  1. #1
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Red face count number of x on another sheet

    i was creating a workbook with sheet1- containing a list of employees and thier offenses, the names are random in order and there are about more than 500 entries, i need to count how many times the names appeared. on another sheet, i have the employee names with their corresponding manager, i need to add the number of times their names appeared on sheet1 on this sheet under column1..

    i was thinking of using a loop statement as follows

    Please Login or Register  to view this content.
    don't worry, there's a lot of people that are far more confused than you
    but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    Be a little easier to offer a solution if we can see your workbook/worksheets are setup. And if can show where you want the results to be shown.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: count number of x on another sheet

    Hi,

    Why not use a Pivot Table with the Count of names. See the attached for how I see this problem solved.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: count number of x on another sheet

    i cannot put here the file from the office. Thus I created a similar file, but with fewer entries. There's about 500 employees, and the violation list can span up to 300 entries. i need to count the number of times the employee names appear in the sheet1(violation) and put the number in sheet2(FTE) column1.

    i need to use this macro on several workbooks with similar task - counting how many times their names appear. the number of employees will increase by next week, we're hiring again. Thus the FTE (sheet2) will have more names on it by then.

    the macro i created on a separate module can only count the first entry, for some unknown reason, it doesn't loop and start back...
    Attached Files Attached Files

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: count number of x on another sheet

    Hi,

    Once again a simple Pivot Table can count those names for you. No VBA or Code needed..
    Attached Files Attached Files

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: count number of x on another sheet

    Like Marvin has said no need for VBA, but if you need heres a code that should do the job

    Please Login or Register  to view this content.

+ 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