Excel Formula to Return a Cell: How to Reference Cells
In this article
The quick answer: to return the contents of another cell, use a direct reference such as =A1, or a lookup function such as =VLOOKUP(...), =INDEX(...) or =XLOOKUP(...) when you do not know the row or column in advance. A direct reference copies whatever is in A1; a lookup finds the right row and column for you. Pick based on whether the target cell's position is fixed or has to be found. Everything below uses standard Excel functions available in desktop Excel and Excel for the web; labels can differ slightly by version and region.
What You'll Need
- Excel on Windows, Mac, or Excel for the web (the examples use commas as the argument separator; some regional settings use semicolons instead).
- A worksheet with data, ideally with headers in the first row so lookups can match column names.
- Basic familiarity with typing formulas into the formula bar and pressing Enter.
- For dynamic array functions like XLOOKUP, a version of Excel that supports them; older releases will show a #NAME? error instead.
Step-by-Step
- Decide what "return" means for your case. If you always want the value from the same cell, a direct reference is enough. If the row changes depending on a name, ID, or date you type, you need a lookup. This single decision saves most of the frustration people hit later.
- Return one fixed cell. Click the cell where you want the result and type
=A1, then press Enter. The cell now shows whatever A1 contains. If A1 is empty, the formula returns 0, which surprises many users; wrap it in=IF(A1="","",A1)to show a blank instead. - Return a cell from another sheet. Type
=Sheet2!B5. If the sheet name contains a space, surround it in single quotes:='Monthly Sales'!B5. You can also start typing=, switch sheets with the mouse, and click the cell, and Excel writes the reference for you. - Return a cell based on a condition. Use IF when there are two outcomes:
=IF(C2>=60,"Pass","Fail"). For three or more outcomes, nest IFs or, on newer versions, use IFS:=IFS(C2>=90,"A",C2>=80,"B",TRUE,"C"). - Return a value from a row that matches a key. With a table in A1:D100 and headers in row 1, a classic vertical lookup is
=VLOOKUP(F2,A2:D100,3,FALSE). The final FALSE forces an exact match. Remember that VLOOKUP counts the lookup column as column 1, so the third column of the range is the value returned. - Use INDEX and MATCH when the column may move.
=INDEX(C2:C100,MATCH(F2,A2:A100,0))returns the value from C where A matches F2. Because INDEX and MATCH reference columns separately, inserting a column between them does not break the formula the way it breaks VLOOKUP. - Use XLOOKUP on supported versions.
=XLOOKUP(F2,A2:A100,C2:C100)returns the matching value from C. Add a fourth argument for what to show when nothing matches, for example"Not found". XLOOKUP searches left or right and defaults to exact matching, which removes two common VLOOKUP mistakes. - Return the value at the intersection of a row and column. For a two-way lookup, use
=INDEX(B2:E10,MATCH(row_key,A2:A10,0),MATCH(col_key,B1:E1,0)). This reads as "go to the row and column that both match, then return that cell." - Return the nth matching result. If duplicates exist and you want the second or third match, INDEX with SMALL and IF as an array formula (or with FILTER on newer versions) is the practical route. FILTER is simpler:
=FILTER(C2:C100,A2:A100=F2)spills every match; wrap it in INDEX(result,2) to pull only the second one. - Return a cell address rather than its value. The ADDRESS function builds the text of a reference, for example
=ADDRESS(5,2)returns$B$5, and=ADDRESS(5,2,4)returnsB5without dollar signs. Use this when you need the reference text displayed, not the value. - Copy the formula safely. Check whether you need relative references (
A1, which shifts as you copy), absolute ($A$1, which does not), or mixed ($A1orA$1). Press F4 while editing a reference to cycle through the four modes on Windows; on Mac, check the function key or key combination your keyboard uses for that toggle.
Common Mistakes
- Forgetting FALSE or 0 in VLOOKUP. Omitting the last argument switches to approximate matching, which returns wrong values on unsorted data. Always state exact matching explicitly.
- Counting columns incorrectly. The column index in VLOOKUP is counted from the first column of the lookup range, not from column A of the sheet.
- Expecting a reference to update. A formula like
=A1re-evaluates, but if you copy the cell and paste as values, the link breaks and the result freezes. - Text that looks like a number. A lookup key stored as text will not match a number stored as a number. Watch for cells flagged with a green triangle; convert with Text to Columns or by re-entering the value.
- Broken sheet names. Sheet names containing spaces or punctuation need single quotes around them, or the formula returns #REF! or a name error.
- Blank results showing as 0. Direct references to empty cells return 0; use IF or a lookup's not-found argument to control what appears.
Tips
- Name your lookup ranges using Formulas > Define Name so formulas read as
=XLOOKUP(F2,IDs,Names)instead of long cell ranges. Exact menu wording varies by version. - Press Ctrl+` (the key above Tab on many layouts) to toggle showing formulas instead of results, which makes auditing a sheet much faster.
- Use Trace Precedents and Trace Dependents on the Formulas tab to see which cells feed a formula and which cells rely on it.
- Convert a data range to an Excel Table with Ctrl+T: structured references then adjust automatically as rows are added.
- If you only need the current value from another workbook, paste as values to avoid link prompts later.
- Wrap risky lookups in IFERROR to show a friendly message:
=IFERROR(VLOOKUP(F2,A2:D100,3,FALSE),"No match").
Troubleshooting
If nothing works, check the error first, because each one points to a specific cause.
- #N/A: no match found. Confirm the key exists in the lookup range, check for leading or trailing spaces with TRIM, and verify text versus number formatting on both sides.
- #REF!: the reference was deleted or is invalid, often after removing rows or columns the formula pointed to. Undo immediately, then rewrite the reference or use INDEX and MATCH so deletions are less destructive.
- #VALUE!: usually text where a number was expected, or a lookup column index on the wrong side of the range.
- #NAME?: a function is misspelled or not supported in your version. XLOOKUP, FILTER and IFS are the usual culprits on older releases; switch to INDEX and MATCH.
- #SPILL!: a dynamic array formula has no room to output. Clear the cells below and to the right of the formula, or move it.
- Formula shows as text: the cell is formatted as Text. Set the format to General and re-enter the formula by pressing F2 then Enter.
- Wrong value with no error: suspect approximate matching or a shifted range. Inspect the lookup range boundaries and confirm the exact-match argument.
Frequently Asked Questions
How do I return a cell's value in Excel?
Type = followed by the cell address, such as =B4, and press Enter. The formula displays whatever that cell contains and updates when the source changes.
How do I return a value from another sheet?
Use the sheet name with an exclamation mark: =Sheet2!A1. Put single quotes around names that contain spaces, like ='Q1 Data'!A1.
What is the difference between VLOOKUP and XLOOKUP for returning a cell?
Both return a value from a matching row. XLOOKUP needs only the lookup range and return range, searches in either direction, and defaults to exact matching; VLOOKUP requires a leftmost lookup column and an explicit exact-match argument.
How do I return the cell address instead of its value?
Use ADDRESS, for example =ADDRESS(3,2,4) to get B3 as text. Note this returns a text label, not a live link to the cell.
Why does my formula return 0 instead of a blank?
The referenced cell is empty and Excel treats an empty cell as zero in arithmetic. Use =IF(A1="","",A1) to display a blank.
Can a formula return a whole matching row?
Yes, on versions that support dynamic arrays: =FILTER(A2:D100,A2:A100=F2) returns every column of the matching rows, spilling into adjacent cells.