+ Reply to Thread
Results 1 to 2 of 2

VLOOKUP with a macro

  1. #1
    Registered User
    Join Date
    09-06-2013
    Location
    Calgary, AB
    MS-Off Ver
    Excel 2010
    Posts
    19

    VLOOKUP with a macro

    I'm trying to work out how to insert a vlookup with my macro, below is the relevant section of code I have been working on. Anyone able to see what I'm doing wrong? The error I'm getting is "Object doesn't support this property or method" and it's highlighting the whole line of "=vlookup((.cells(active.........,2,False)"

    Please Login or Register  to view this content.
    Hoping someone can help me out, been struggling with this forever now. I've attached my test sheet as well to see whole code and be able to test results.

    Add vlookup and hide sheet.xlsm

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: VLOOKUP with a macro

    If you want to put a formula in a cell you need to use formula-syntax iso vba syntax.
    E.g. you can't put
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    into a cell. You need to translate that to formula-syntax.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

+ 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] Macro- adding Vlookup to a macro
    By TERRI LEE in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 05-06-2013, 02:28 AM
  2. [SOLVED] Adapt A Sumif Macro to A Vlookup Macro
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2012, 06:22 PM
  3. Complex Vlookup/ VBA function or Macro Needed For "if contains text then vlookup"
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-09-2012, 03:48 AM
  4. Applying Vlookup using a Macro(Vlookup+Macro) in Excel 2007
    By Sumku in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2009, 08:58 PM
  5. 255 Character Truncation, Vlookup Macro vs. Opening Workbook Macro
    By jrew23@yahoo.com in forum Excel General
    Replies: 1
    Last Post: 02-26-2005, 02:06 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