+ Reply to Thread
Results 1 to 6 of 6

Vlookip to VBA Script

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    12

    Vlookip to VBA Script

    Hello Guys,

    Was wondering how I would put the following into a vba script:

    =VLOOKUP("*"&A2&"*",Sheet2!B:B,1,0)


    I would usually put this formula into cell B2 of Sheet One and drag it down to the whole column - but I was wondering how i would put this in a vba script and have the vba script put my results in Column B of Sheet 1. Thank you in advance for your assistance.


    Cheers,

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Vlookip to VBA Script

    Assuming you are wanna enter the formula in Column C
    The code would be..
    Please Login or Register  to view this content.
    Untested though...
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Vlookip to VBA Script

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-09-2014
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Vlookip to VBA Script

    Hello Vik,

    When i use your formula i get the following error: "Type Mismatch".

    Cheers,

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Vlookip to VBA Script

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Vlookip to VBA Script

    May be this..
    Please Login or Register  to view this content.
    A Sample workbook with non sensitive data would be helpful....
    Last edited by Vikas_Gautam; 10-07-2014 at 10:23 PM.

+ 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. script to run the macro from Vb script with out opening the excel file
    By chandanp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2021, 03:33 AM
  2. [SOLVED] To pull multiple data not captured by Vlookip
    By darshu85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2012, 02:48 PM
  3. Excel 2007 : Find and match - Vlookip/Script
    By macpegg in forum Excel General
    Replies: 3
    Last Post: 10-26-2011, 10:24 AM
  4. Create VBA script to short, dedicated button in excel for script?
    By realized in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2009, 11:54 PM
  5. Script that edits the text printed on the button that runs the script
    By petalred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2008, 02:41 PM

Tags for this Thread

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