Match
The Match function gives a relative position in a range. (it is comparable to the arrayX.indexOf function in javascript...)
Google ReferenceSyntax
- Theoretical example: Match ("B", "ABCD",0) would return 2... but "ABCD" would in fact be in cells something like "A1:D1")
Google ReferenceSyntax
- MATCH(search_key, range, search_type)
- MATCH("Sunday",A2:A9,0)
- MATCH(DATE(2012,1,1),A2:F2)
- INDEX(A2:X9, match("20180114_647" , "A:A"), match("last_name",A2:X2) ) // lookup last name for an known order ID..
- Search Type -- In most cases, you will want/need to set the 3rd and optional parameter to 0, which indicates you are looking for an exact match in a list that can be un-ordered. If you leave it blank it defaults to 1, and that assumes your data is in ascending order and it gets close to what you are looking for without needing an exact match. I've yet to use this "default" setting.