+ Reply to Thread
Results 1 to 14 of 14

Macro to Lookup and copy

  1. #1
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Macro to Lookup and copy

    I need a macro
    ScreenHunter_002.jpg

    1. To lookup the value at Sheet1!A1 from Colimn B of Sheet2!
    2. Copy ONLY THE VALUE of C1:E1 of Sheet!1 to Column E:G of Sheet2!
    3. Stop at Sheet1!A1

    Thank you
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Macro to Lookup and copy

    Hi,
    Try this code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,592

    Re: Macro to Lookup and copy

    VBA?
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    kasan,

    The macro works only when the names in Column B are sort in order. And it copies all including formula and format but not only copies the value.

  5. #5
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    jindon,

    it doesn't work.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,592

    Re: Macro to Lookup and copy

    Quote Originally Posted by kent97 View Post
    jindon,

    it doesn't work.
    ...................
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    jindon,

    Copy only the value from sheet1 to sheet2 but not vice versa.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,592

    Re: Macro to Lookup and copy

    OOps, other way around...
    Please Login or Register  to view this content.
    Edit: Code has been edited.
    Last edited by jindon; 03-01-2017 at 04:49 AM.

  9. #9
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Macro to Lookup and copy

    What about this one
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    kasan

    Exactly!
    Thank you very much.

  11. #11
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    jindon,

    Still not work, thank you anyway.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,592

    Re: Macro to Lookup and copy

    You might have old code before I edited.
    So, try the code again if you like.

  13. #13
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Macro to Lookup and copy

    jindon

    Yes,

    It works properly by using the new code.
    Thank you very much.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,592

    Re: Macro to Lookup and copy

    OK, sorry for the confusion and thanks for the feedback.

+ 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] VBA - Macro to Copy Data to Other sheets / LOOKUP/INDEX
    By Bloodywog in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-16-2015, 05:59 AM
  2. [SOLVED] Copy & Paste Macro (with funky lookup?)
    By jrnewport1115 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2014, 10:35 AM
  3. Macro V Lookup copy and paste from different worksheets
    By Fredbugatti in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-17-2014, 02:49 AM
  4. Macro or function to lookup and copy and paste the information
    By tjwm202 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2009, 10:05 PM
  5. Macro to copy and paste or maybe lookup fx?
    By go4cdt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2009, 01:55 PM
  6. Use Lookup then copy in Macro
    By mikeijre in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-08-2009, 04:21 PM
  7. macro to lookup data and copy and paste
    By adamski in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2008, 06:31 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