+ Reply to Thread
Results 1 to 9 of 9

Count Macro

  1. #1
    Forum Contributor
    Join Date
    09-25-2013
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2013
    Posts
    115

    Count Macro

    Hi everyone
    Attached is a file with a "Before" and "After" sheet.

    I want to count the number of each specific "course" in colum A (see Before sheet)
    and put the answer in colum B and the student/s which takes the course in colum C (see After sheet)

    I want to count the number of each specific "module" in colum B (see Before sheet)
    and put the answer in colum E and the student/s which takes the module in colum F (see After sheet)

    Your assistance much appreciated.
    Attached Files Attached Files

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

    Re: Count Macro

    Many People have looked at this but you have not had any responses.

    Could it be because there seems to be no correlation between the courses and the modules.

    Perhaps more explanation is required.
    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.

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

    Re: Count Macro

    Hi Tyso,

    See if the Pivot Table in your attached file works for you. Right click on any of the Pivot fields and Expand or Collapse to group.

    Course Module Students PT.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Count Macro

    See if this does what you want

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  5. #5
    Registered User
    Join Date
    05-10-2016
    Location
    Cordoba, Argentina
    MS-Off Ver
    2016
    Posts
    27

    Re: Count Macro

    Like Marvin said may you need a Pivot Table
    I have not find one that solves your After Sheet but I have try with two
    Courses Students and Count
    Ty1.png

    And & Or
    Modules / Student and Count
    Ty2.png

    Cheers
    Sergio

  6. #6
    Forum Contributor
    Join Date
    09-25-2013
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2013
    Posts
    115

    Re: Count Macro

    Thank you MarvinP, it works!!

  7. #7
    Forum Contributor
    Join Date
    09-25-2013
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2013
    Posts
    115

    Re: Count Macro

    Perfect! It works! Thank you JLGWhiz.

  8. #8
    Forum Contributor
    Join Date
    09-25-2013
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2013
    Posts
    115

    Re: Count Macro

    Thank you Sergio, the Pivot table works!

  9. #9
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Count Macro

    Quote Originally Posted by Tyso View Post
    Perfect! It works! Thank you JLGWhiz.
    Yoo're welcome,
    regards, JLG

+ 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. [SOLVED] Macro, Row count autosum and divided by row count
    By Zerga in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2018, 06:15 AM
  2. Count If macro
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-17-2016, 01:32 PM
  3. Macro count items in sheet2 and provide count in embedded label in sheet1
    By jaredmccullough in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-05-2015, 11:27 AM
  4. Run macro if count of L > Count of K
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2014, 02:04 PM
  5. [SOLVED] Filtering macro, count number of rows and include count in last column.
    By Folshot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2012, 07:17 AM
  6. Macro to Count if MAX
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-10-2011, 01:02 PM
  7. 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