Results 1 to 4 of 4

VBA code to match and mark data from multiple sheets into a master sheet.

Threaded View

  1. #1
    Registered User
    Join Date
    12-05-2014
    Location
    Hanoi, Vietnam
    MS-Off Ver
    MAC
    Posts
    9

    VBA code to match and mark data from multiple sheets into a master sheet.

    Hi everyone,

    I'm totally new working with Excel and so my question might have an easy fix solution for you Excel masters out there

    I have this company Personnel file (Master sheet) and multiple training attendance sheets. What I would like to do is to compare data from multiple attendance sheets to data in a Master sheet using VBA.

    Here an example of my Master sheet named "Master":
    No	Personnel No.	Personnel Name	Status	Sep24-2015@0900-1000	Sep24-2015@1030-1130
    1	17000017	Name 1			
    2	17000026	Name 2			
    3	17000033	Name 3			
    4	17000045	Name 4			
    5	17000050	Name 5			
    6	17000054	Name 6			
    7	17000063	Name 7			
    8	17000066	Name 8			
    9	17000067	Name 9			
    10	17000070	Name 10			
    11	17000071	Name 11
    Here an example of my first Training attendance sheets named "Sep24-2015@0900-1000":
    No	Personnel No.	Personnel Name	Signature
    1	17000017	Name 1	        X
    2	17000026	Name 2	
    3	17000033	Name 3	        X
    4	17000045	Name 4	        X
    5	17000050	Name 5	
    6	17000054	Name 6	
    7	17000063	Name 7	
    8	17000066	Name 8	        X
    9	17000067	Name 9	
    10	17000070	Name 10	        X
    11	17000071	Name 11
    Here an example of my second Training attendance sheets named "Sep24-2015@1030-1130":
    No	Personnel No.	Personnel Name	Signature
    1	17000017	Name 1	
    2	17000026	Name 2	        X
    3	17000033	Name 3	
    4	17000045	Name 4	
    5	17000050	Name 5	        X
    6	17000054	Name 6	        X
    7	17000063	Name 7	        X
    8	17000066	Name 8	
    9	17000067	Name 9	        X
    10	17000070	Name 10	
    11	17000071	Name 11	        X
    I would like the VBA code to:
    1. Loop trough the first Training Attendance sheet
    2. Check if the "Signature" column (D) is marked
    3. Look at the ID number in Column B and find the matching ID number in the Master sheet.
    4. Then go to the correct column (which has the same name as the Attendance sheet) and mark the cell in the correct column.
    5. Go to the next Training attendance sheet and repeat steps 1-5.

    So in the end my Master sheet will look something like this:
    No	Personnel No.	Personnel Name	Status	Sep24-2015@0900-1000	Sep24-2015@1030-1130
    1	17000017	Name 1	        1	X	
    2	17000026	Name 2	        1			        X
    3	17000033	Name 3	        1	X	
    4	17000045	Name 4	        1	X	
    5	17000050	Name 5	        1			        X
    6	17000054	Name 6		1			        X
    7	17000063	Name 7	        1			        X
    8	17000066	Name 8	        1	X	
    9	17000067	Name 9	        1			        X
    10	17000070	Name 10	        1	X	
    11	17000071	Name 11	        1			        X
    I've been struggling with this problem for two weeks now and have no idea how to write the proper VBA code instead of a long senseless VBA code full of error.

    Many thanks in advance.
    Mike
    Attached Files Attached Files
    Last edited by spikedemike; 09-30-2015 at 11:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 03-11-2015, 07:01 PM
  2. [SOLVED] Need to modify VBA Code that copies multiple sheets to a master sheet
    By AXGirl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2014, 04:37 PM
  3. [SOLVED] Populate master sheet from data on multiple sheets
    By jhammond10 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-05-2013, 01:36 PM
  4. Need cut and paste data from multiple sheets to one master sheet
    By cokillerliu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2013, 06:41 PM
  5. [SOLVED] Run time error in code that extracts data from several sheets into master sheet
    By Hello23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2012, 10:11 PM
  6. Copying data from multiple sheets to master sheet
    By phong919 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2010, 04:30 PM
  7. Copying row data from a Master sheet to multiple sheets
    By f3racer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2009, 08:28 PM

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