+ Reply to Thread
Results 1 to 2 of 2

Vlookup in VBA or alternative to Vlookup

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Vlookup in VBA or alternative to Vlookup

    I'm just not having a good day with VBA..

    I'm trying to find a value based on a date (found in my hist_wghts.B range). I've tried:

    Please Login or Register  to view this content.
    But this just returns a #VALUE-error in the entire S column.. I also tried using

    Please Login or Register  to view this content.
    But i think this requires that I activate the "correct" worksheet? Don't want to do that.

    Is there a solution using Vlookup or should i use another method? If i should stick to vlookup, is there another way of specifying the range in which the vlookup searches as all the dates are found in vwhs.Range(B*) and all the values i'm looking for are found in vwhs.range(JD*), the middle part is useless in this part of the calculations.

    *Note* Can't attach workbook due to confidentiality

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,395

    Re: Vlookup in VBA or alternative to Vlookup

    It might help to post a sample workbook so we can see where all the data is and what the named ranges cover.

    I often take the easy way out and drop a working VLOOKUP into the top cell in the range. Once it's working, I copy it and assign it to the whole range and use ".Value = .Value" to convert it to static value.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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