+ Reply to Thread
Results 1 to 5 of 5

VBA to count Cell value and paste the number in Another sheet.

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    VBA to count Cell value and paste the number in Another sheet.

    Hi,

    1 ) I have names in Column A of sheet1.
    2) In Sheet 2, I have data of those employees in each row.
    3) I am trying to build a code which would count the number of times employee name located in Sheet 2 of Column A and put the result in "B" column of Sheet1 in front of that same employee name.

    Please advice.

    Thanks,
    Shiva
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: VBA to count Cell value and paste the number in Another sheet.

    Sounds like you need to use the COUNTIF function. You can access this in VBA by use of the WorksheetFunction or Application objects.
    Martin

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to count Cell value and paste the number in Another sheet.

    I can do the coding for countif, but not sure how to make it read and copy n paste the data in Sheet1 in front of that ee name.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: VBA to count Cell value and paste the number in Another sheet.

    Maybe this

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to count Cell value and paste the number in Another sheet.

    Thanks!!! Worked...

+ 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: 1
    Last Post: 03-03-2014, 08:45 PM
  2. Count ID numbers - Cut & Paste any greater than a certain number
    By WCE_123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2013, 07:30 PM
  3. count number of x on another sheet
    By ag273n in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2013, 09:33 AM
  4. Count the number of duplicates in a sheet, report the duplicate cells to a new sheet.
    By SamPetroda in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 09:48 AM
  5. Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A
    By Agent:Orange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2011, 07:56 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