+ 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
    44

    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
    18,413

    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
    44

    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 Expert
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,531

    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
    44

    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 Expert
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    2013
    Posts
    1,531

    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
    XLS 2016
    Posts
    3,112

    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
    XLS 2016
    Posts
    3,112

    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
    XLS 2016
    Posts
    3,112

    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)

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