Results 1 to 8 of 8

VBA: Looking for a Macro to Match and Copy from Source to Destination Sheet

Threaded View

  1. #1
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,273

    VBA: Looking for a Macro to Match and Copy from Source to Destination Sheet

    I am wondering if anyone could help me with this? I have attached a file with two sheets: source and destination.

    Cell D5 on the source sheet contains a drop-down with a list of named ranges that have been defined on the destination sheet. I would like to have a macro assigned to the button on the source sheet that will copy from the list in column D on the source sheet to the relevant assessment column (Y7_M2 has been selected) on the destination sheet. The macro needs to copy data for the correct student: the unique identifier is in the ID column on each sheet. The lists on the two sheets may not be identical: there may be students missing in the source list, and there may even be extra students who do not exist in the destination list. The extra students can be ignored: they do not need to be added to the destination list. If a student in the destination list does not have a match in the source list, then nothing should be written to his/her cell in the destination column. The names of the two sheets will remain constant: they will not be changed.

    As a complete novice, I'm not sure where to start and I have no idea how complicated what I am asking may be - sorry. I know how to record a macro, but as the lists may not be identical, doing it this way would be impractical. I also know how to do an INDEX MATCH to get the information from one sheet to the other using a formula, but the idea is to use the source sheet to populate the destination sheet each time an assessment has been taken. I hope this makes sense! Thank you for any and all advice.
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VB Code to copy certain files from Source to destination
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2016, 09:42 PM
  2. Match data on source and destination sheet and change value
    By Cammandk in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-25-2014, 03:18 PM
  3. Need macro help to copy from specify source file,sheet,range to specified destination file
    By Raghuram K B Reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2014, 09:43 AM
  4. Macro to copy and paste source file to destination file using cell value
    By mani88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2013, 10:16 AM
  5. how to copy (source sheet) a sheet going to another sheet (destination)
    By gerard_gonzales33 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-28-2012, 04:54 AM
  6. Copy formula with source destination
    By tek9step in forum Excel General
    Replies: 7
    Last Post: 12-11-2009, 06:56 AM
  7. copying and pasting from source sheet to destination sheet without naming source sht?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2006, 01:15 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