+ Reply to Thread
Results 1 to 4 of 4

VBA vlookup with variable for sheet reference

  1. #1
    Registered User
    Join Date
    08-08-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    15

    VBA vlookup with variable for sheet reference

    My apologies, I don't post on here very much, so please forgive my ignorance in posting.

    I don't know if this is a syntax thing or what, but I'm getting an "Object doesn't support this property or method" error when it hits this line of code...

    Please Login or Register  to view this content.
    I want this formula entered in column CW on each sheet referred to in a loop, and on each sheet the vlookup will reference a different sheet, also indicated by a loop looking at a list. The loop seems to be working fine, just not the entering of this formula. I hope this makes sense because it sounds iffy to me. Thanks in advance for any help you can offer.

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

    Re: VBA vlookup with variable for sheet reference

    If wsLMPP is declared as as worksheet, you will need to use wslmpp.Name
    But I suspect the formula is wrong & it should be
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-08-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: VBA vlookup with variable for sheet reference

    Thank you, that's perfect!!!

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

    Re: VBA vlookup with variable for sheet reference

    You're welcome & 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. Replies: 7
    Last Post: 02-19-2017, 02:43 PM
  2. variable text strings with numbers for vlookup reference
    By Ken Pauze in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-13-2015, 06:18 PM
  3. Replies: 1
    Last Post: 05-06-2013, 05:20 PM
  4. Variable File Reference and Variable Table Array in VBA VLOOKUP
    By Gingeiko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2011, 11:08 PM
  5. VLookup - creating a variable Sheet reference?
    By futbol1097 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2007, 01:57 PM
  6. Vlookup with variable worksheet reference
    By trempnvt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-23-2006, 01:50 PM
  7. VLOOKUP: Making a file and worksheet reference into a variable....
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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