+ Reply to Thread
Results 1 to 9 of 9

Vlookup in VBA for selected cells

  1. #1
    Registered User
    Join Date
    12-04-2014
    Location
    texas
    MS-Off Ver
    2010
    Posts
    47

    Vlookup in VBA for selected cells

    I am trying to do a sheet clean and would like column a in sheet "inp" to drive a vlookup to column b in sheet "inp" with all data driven from sheet "m" referenceing a2:h650. can someone help? ive already got the vlookup working successfully just want to clean it up a bit

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Vlookup in VBA for selected cells

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-04-2014
    Location
    texas
    MS-Off Ver
    2010
    Posts
    47

    Re: Vlookup in VBA for selected cells

    Thsnk youfor your response. Im enclosing a snippet using genrci data. i need the vba to do vlookup for a long range of data
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Vlookup in VBA for selected cells

    How about
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-04-2014
    Location
    texas
    MS-Off Ver
    2010
    Posts
    47

    Re: Vlookup in VBA for selected cells

    thank you very much. is there a way to make it work without clicking a button however? just as info is posted into column a?

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Vlookup in VBA for selected cells

    How are the values getting into column A?
    is it via formula,manually entered, pasted in ?

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Vlookup in VBA for selected cells

    Another one
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Vlookup in VBA for selected cells

    If you want to activate the macro when entering data in column "A" in sheet "inp" then in sheet's code put
    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Vlookup in VBA for selected cells

    To close the loop put next macros in sheet 'inp" code, it will prepare the data when openning the tab and refresh when new value in column "A"
    Please Login or Register  to view this content.

+ 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: 04-26-2017, 09:08 AM
  2. [SOLVED] Pasting an image into selected merged cells. VBA to size automatically to selected range
    By DCC_PD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-28-2015, 09:57 AM
  3. [SOLVED] Join and Merge Selected Selected Cells
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2014, 06:54 PM
  4. Loop backwards through selected range - delete entire row from selected cells
    By scottbass in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2014, 09:21 AM
  5. Replies: 2
    Last Post: 08-28-2011, 02:39 AM
  6. copy data from selected cells , in selected row and paste it to ms word table ?
    By aaashaaa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2010, 03:25 PM
  7. Macro to take selected cells times a selected cell
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2005, 08:05 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