What is the closest function to INDEX( ,MATCH( in Google Apps?

By : Julz
Source: Stackoverflow.com

I have a master spreadsheet which has the excel function: =INDEX(D2:D4,MATCH(F11,B2:B4,0))

How would you express this in Google Apps or is there anything close to it?

Here is the part of the code which needs to be modified:

    var link = masterSheet.getRange('F11').getValues();//here is the problem


    var ss = SpreadsheetApp.openById(link);
By : Julz


That same formula should work equally well in both Excel and google spreadsheets, doesn't it work? VLOOKUP could also be used in both to do the same, i.e.


If you are wanting to achieve the same functionality in Google Apps Script, and if I'm understanding correctly:

var lookup = masterSheet.getRange('F11').getValue();
var range = masterSheet.getRange('B2:D4').getValues();
var lookupRange = [];
for (var i = 0; i 
By : AdamL

This video can help you solving your question :)
By: admin