+ Reply to Thread
Results 1 to 10 of 10

Macro to transfer data

  1. #1
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Macro to transfer data

    Looking for a macro to do the following: WHEN SHEET2! Column R cell matches SHEET1! Column C THEN populate SHEET2! Column Z cell from SHEET1! Column D

  2. #2
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: Macro to transfer data

    put the following code in a module. run it (as a test). does it do what you asked? if yes then i will write the routine that works on any row.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Re: Macro to transfer data

    I couldn't get it to work.

  4. #4
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: Macro to transfer data

    let me upload a sample file. make sure to delete the contents of D1 on Sheet1 if it exists. so my code works for me.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: Macro to transfer data

    so i misread the OP, the sub should be like this

    Please Login or Register  to view this content.
    replace your existing code with the above. sorry about the confusion

  6. #6
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Re: Macro to transfer data

    I guess I’m not wording what I’m looking for correctly. I need something that goes like this. If any cell in SHEET2! Column R matches any cell in SHEET1! Column C then I need the corresponding value in SHEET1! Column D to populate corresponding SHEET2! Column Z

    I think I’m on the right track but my results will run the entire column instead of stopping on last row.
    =VLOOKUP(R3,SHEET1!$C$2:$D$1000,2,0)
    Attached Files Attached Files
    Last edited by gz3s36; 09-04-2017 at 05:03 PM.

  7. #7
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Re: Macro to transfer data

    =IFERROR(VLOOKUP(R3,'PERSONAL CATALOG'!$C$2:$D$1000,2,0)," ") did the job. Youtube is a wonderful thing. Just like this forum.

  8. #8
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: Macro to transfer data

    thanks for posting your solution. please mark the thread as solved (even if you solved it).

    thanks

  9. #9
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Re: Macro to transfer data

    Thought I did. Sorry.

  10. #10
    Forum Contributor
    Join Date
    02-06-2014
    Location
    The Show Me State
    MS-Off Ver
    Excel 2013
    Posts
    343

    Re: Macro to transfer data

    I Did. I don’t know why it isn’t showing that.

+ 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. Data Transfer Macro
    By furbmikey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2017, 04:01 PM
  2. Macro to Transfer Data has bug
    By geliedee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2016, 03:19 AM
  3. Data Transfer Macro
    By JPSIMMON in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2015, 12:34 PM
  4. Macro Help - Creating Macro to Transfer Data to Different Sheets
    By gjacobo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-26-2015, 08:03 PM
  5. Replies: 4
    Last Post: 01-18-2013, 10:49 PM
  6. Macro to transfer data from 1 tab to another
    By miztangee09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2011, 09:43 PM
  7. Transfer Data Macro
    By Loisw in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-02-2009, 04:02 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