Google Sheets INDEX MATCH to Look Left for Schoolwork
To look up a name when the number you know sits to its right, type =INDEX(A2:A4, MATCH(D2, B2:B4, 0), 1) in an empty cell. Google says VLOOKUP needs the lookup value to the left of the value to return, and that INDEX and MATCH can be used wherever the lookup value sits.
Start with a practice sheet you own
Open your own unshared native Google Sheet on a computer. Check the account, the file title and your editing access. Use a new practice sheet with a few cells and nothing else nearby.
Do not change a teacher's template, a live tracker or another person's cells, and agree changes with the owner first. If the practice cells already hold values or formulas, stop and ask before going on.
This guide uses one INDEX and MATCH formula on three fictional students. It does not teach VLOOKUP, XLOOKUP, approximate match, wildcards, two-way lookups, several criteria, error fixes, copying the formula down, other languages' function names, or the mobile app.
Set out the fictional cells
A1 holds Student and B1 holds Roll number. A2 holds Asha and B2 holds 11. A3 holds Meera and B3 holds 12. A4 holds Ravi and B4 holds 13. D1 holds Roll to find and E1 holds Student found. D2 holds 12 as an ordinary number. E2 is empty and is where the formula will go.
The roll number is to the right of the name, so VLOOKUP cannot return the name. Google's INDEX page shows a guest table where INDEX with MATCH finds who is at table number 2, and says VLOOKUP would not be possible there. This guide uses a smaller version of that idea. If it works the same way here, MATCH(D2, B2:B4, 0) should give 2 and E2 should show Meera. That cell version is this guide's own expectation and was not run in Sheets.
Look up the name with INDEX and MATCH
- Check that A1:E4 are empty on the practice sheet.
- Type Student in A1 and Roll number in B1.
- Type Asha, Meera and Ravi in A2, A3 and A4, and 11, 12 and 13 in B2, B3 and B4.
- Type Roll to find in D1, Student found in E1 and 12 in D2.
- In E2, type =INDEX(A2:A4, MATCH(D2, B2:B4, 0), 1) and press Enter.
Google gives the forms INDEX(reference, [row], [column]) and MATCH(search_key, range, [search_type]), with the sample usage INDEX(A1:C20, 5, 1). Google's pages do not say how to finish typing a formula. Excel Insider says to press Enter after typing its INDEX and MATCH formula, and this guide follows that for the key press.
Type the formula once, as above. This guide does not copy it down a column or look up more than one roll number.
Check the name and the cells
- Check that E2 shows Meera.
- Check that the INDEX range A2:A4 and the MATCH range B2:B4 cover the same three rows.
- Check that D2 and B2:B4 hold ordinary numbers typed the same way.
- Check that A2:B4 and D2 still hold what you typed.
- Compare the cells next to the table with how they looked before.
If E2 shows something else, stop and read the formula and its ranges. Do not retype the result by hand to match this guide. Leave an unexpected formula alone and ask the owner.
Know what INDEX and MATCH do
Google says MATCH returns the relative position of an item in a range, and that search type 0 is an exact match and is required when the range is not sorted. The default 1 assumes the range is sorted in ascending order. Google also says MATCH needs a one-row or one-column range.
Google says INDEX returns the content of a cell specified by row and column offset. The row counts from the first cell of the range you give it, not from the top of the sheet, and Sheets Bootcamp says the same.
This guide does not teach what happens when no roll number matches. It does not teach XLOOKUP, two-way lookups or several criteria. These steps were not run in Sheets.
Check the required output and hand-in separately
If a PDF, form or printout needs the name, check that actual file or field. A formula result in the editor is not proof of what the file shows. Follow the teacher's hand-in instructions separately.
A found name does not check the work, grant access or submit the assignment. These are source checks, not a hands-on Sheets or student-account test. No mobile parity, export fidelity, accessibility compliance or grade benefit is promised.
Common questions
How do I look up a value to the left in Google Sheets?
Use INDEX with MATCH. Google says VLOOKUP needs the lookup value to the left, while INDEX and MATCH work wherever it sits. In this practice E2 holds =INDEX(A2:A4, MATCH(D2, B2:B4, 0), 1), so with 12 in D2 it should show Meera. This was not run in Sheets.
Why does MATCH end with a 0?
Google says search type 0 is an exact match and is required when the range is not sorted. The default 1 assumes the range is sorted in ascending order and returns the largest value less than or equal to the search key. This guide uses 0.
Does MATCH give the row number of the sheet?
No. Google says MATCH returns the relative position of an item in a range. With 12 in D2, MATCH(D2, B2:B4, 0) should give 2, the second cell of B2:B4, even though that cell is in row 3 of the sheet. This was not run in Sheets.
What if the two ranges do not line up?
Zite, a secondary source, says ranges that start on different rows can return a neighboring row's value with no error. This guide uses A2:A4 and B2:B4, which cover the same rows. Check the result against the table you typed.
Does this lookup make the answer correct?
No. It only finds the name next to a matching number. It does not check that the roll numbers are right or that a name is spelled correctly. Check the real list and follow the teacher's separate hand-in instructions.
Sources and scope
Sources checked . Google controls the INDEX and MATCH forms, the sample usage, the exact match rule, the relative position note and the guest table example. The other pages are secondary and support context only. Their wording is not Google confirmation.
- Google help: INDEX - the INDEX(reference, [row], [column]) form, the sample usage, the row and column offset note, and the guest table example where INDEX with MATCH finds table number 2 and VLOOKUP would not be possible.
- Google help: MATCH - the MATCH(search_key, range, [search_type]) form, the one-dimensional range note, search type 0 as exact match and the default 1 for an ascending sorted range.
- SheetError: look left of the key - says VLOOKUP cannot return a column to the left of the column it searches, and shows INDEX with MATCH returning a name from a sku typed as a number. Its XLOOKUP steps are not taught here.
- Excel Insider: reverse VLOOKUP in Google Sheets - shows INDEX with MATCH and a final 0 for an exact match, and says to press Enter. Its ARRAYFORMULA, QUERY and FILTER methods are not taught here.
- Zite: INDEX MATCH in Google Sheets - says INDEX and MATCH ranges that start on different rows can return a neighboring row's value with no error. Its other sections are not taught here.
- Sheets Bootcamp: INDEX MATCH - says INDEX counts rows within the range you give, not from the top of the sheet, and that both ranges need the same number of rows. It also shows left lookups, the same idea as this guide. Its two-way lookups and multiple criteria are not taught here.