+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP inside macro to copy/paste values?

  1. #1
    Forum Contributor
    Join Date
    07-14-2012
    Location
    Belgium/UK
    MS-Off Ver
    Excel 2003
    Posts
    111

    VLOOKUP inside macro to copy/paste values?

    Ello,

    So... Going try and explain it as simple as possible.

    We use 2 workbooks at the office, Wb A has data entry all day long, Wb B is used at the end of the week, to collect certain aspects of Wb A. Wb B is using the vlookup to Wb A to get an entry from A1 (which refers to Wb A) to reflect it in C1. Cell A1 is always entered manually as we do not know which data is requested. Wb B Sheet 2 has all entries from Wb A. Is it possible to use the VLOOKUP within a macro, that, if executed it copies the value from C1 and searches through the entries in Sheet 2, and then pastes the value in the according C row?

    Doesn't sound very clear, does it :p..

    I have attached a mini version of what I mean.
    Please Login or Register  to view this content.
    I will try to answer any questions as quick as I can and any help is really appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: VLOOKUP inside macro to copy/paste values?

    Try:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    07-14-2012
    Location
    Belgium/UK
    MS-Off Ver
    Excel 2003
    Posts
    111

    Re: VLOOKUP inside macro to copy/paste values?

    @Kaper: That works brilliant. Thank you so much. Is there a possibility to add
    Please Login or Register  to view this content.
    so when it shifts the cell that is already filled out (when the same selection is made) moves 1 cell to the right and enters the new data in C1? (and continues to do this on every time you submit the same one) Then it would be perfect
    Last edited by realrookie; 09-14-2015 at 02:46 PM.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: VLOOKUP inside macro to copy/paste values?

    If I understood well (this time not opened the files, so may be I'm wrong), this shall be the place to add
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-14-2012
    Location
    Belgium/UK
    MS-Off Ver
    Excel 2003
    Posts
    111

    Re: VLOOKUP inside macro to copy/paste values?

    That doed exactly what I need. 1000 thanks, +rep

+ 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: 05-14-2014, 12:52 AM
  2. [SOLVED] Copy and Paste Cells with Formulas inside
    By camillecamille in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2013, 05:16 PM
  3. Help with VLOOKUP and Copy & Paste Macro
    By slny06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2013, 09:03 AM
  4. Macro that copy all data inside a workbook and paste in value in another document
    By elpoil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2013, 10:07 AM
  5. VBA Macro to Copy and Paste a row Like a VLOOKUP
    By arlecchino in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 05:10 AM
  6. [SOLVED] Vlookup with copy and paste macro
    By kasperblue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2012, 05:27 PM
  7. Hyperlink vlookup and some copy paste values. Please help.
    By m_oioisju in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2012, 12:55 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