+ Reply to Thread
Results 1 to 4 of 4

Vlookup alternative

  1. #1
    Registered User
    Join Date
    07-19-2007
    Posts
    51

    Vlookup alternative

    I need perform a function similar to a Vlookup, however the vlookup is ineffcient because it is looking through 32,000 values. I wanted to write some macro that will perform a "find" from a short list against the large 32,000+ list. If the value is found, a specific value (i.e "x") is put in the adjacent cell. Once the value is matched the macro goes to the next value in the list (since there can only be one occurence of each there is no point in going throough the remainder of the list). Any input welcome

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Vlookup alternative

    Perhaps something like this....

    With A1:A32000 containing a list of values

    B1: (a value to find)

    This formula returns X if found, otherwise nothing
    C1: =IF(COUNTIF($A$1:$A$32000,B1),"X","")

    Is that something you can work with?
    ...or do you need something else?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try this, you will need to adjust the ranges for your layout

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    346
    Quote Originally Posted by jchambers00
    I need perform a function similar to a Vlookup, however the vlookup is ineffcient because it is looking through 32,000 values. I wanted to write some macro that will perform a "find" from a short list against the large 32,000+ list. If the value is found, a specific value (i.e "x") is put in the adjacent cell. Once the value is matched the macro goes to the next value in the list (since there can only be one occurence of each there is no point in going throough the remainder of the list). Any input welcome
    I think Vlookup is very efficient. It does not scan through all 32000 values every time, as you said . Moment it finds a match it abandons the search and does not go through the rest of values. It will only scan all the 32000 values if it does not find a match or finds a match at the bottom of the table array.

    A V Veerkar

+ 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