VBA Conversion Question - MATCH [closed]

asked 2013-11-24 20:05:32 +0200

slink9 gravatar image

Hi, I am converting an Excel sheet to LibreOffice. I have the following line of code that works beautifully to determine the row where a specific mileage is found (or the row after if no exact match is found).

offnbr = Application.Match(nbr, Range("a5:a1515"), 1)

I see INDEX ... MATCH used on this site but cannot seem to get the syntax right. I currently have

Spot = INDEX($B$5:$B$1515,MATCH(nbr,$A$5:$A$1515)

I gather that this will find nbr in column A and return the corresponding value in column B, same row. Am I understanding correctly?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-05 01:28:10.354926


Match() will return the row position of "nbr" at column A. Then Index() uses the row position at column B, and return the value at cell in column B at that row.

It equal with vlookup() function.

Paijo gravatar imagePaijo ( 2013-11-24 20:48:51 +0200 )edit