+ Reply to Thread
Results 1 to 2 of 2

New function to do vlookup for multiple columns

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    46

    New function to do vlookup for multiple columns

    I found the function below online and wanted to use it however I get a syntax error when I try to use the function. Any ideas whats wrong with the syntax?

    Please Login or Register  to view this content.
    Last edited by bobaftt; 02-06-2009 at 01:04 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: New function to do vlookup for multiple columns

    Surplus lines need to be removed, below is the same albeit with a different last line:

    Please Login or Register  to view this content.
    If you assume you have a table of data say in A3:H10 and you want to return contents of column H where A:E match criteria values specified in A1:E1 you would use the UDF as so:

    Please Login or Register  to view this content.
    But you could of course do the same thing with native formulae, eg:

    Please Login or Register  to view this content.
    which would be quicker...IMO

    The difference would only appear if you had 1+ instances of the 5 matches... the UDF would return the first Match whereas the LOOKUP would by default return the last.... if there's only one match they'd both return the same result.
    Last edited by DonkeyOte; 02-06-2009 at 01:37 PM.

+ 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