Excel Formula to Pull Data From Another Tab
In this article
To pull data from another tab in Excel, use a formula that names the sheet and cell: =Sheet2!A1 returns whatever sits in cell A1 of the tab called Sheet2. Type the equals sign, click the other tab, click the cell you want, and press Enter — Excel writes the reference for you. For matching values by a key (for example pulling a customer's phone number using their name), use =VLOOKUP() or =XLOOKUP() instead. The steps below cover both the simple direct reference and the lookup versions, plus what to do when the result is wrong.
What You'll Need
- Excel on desktop (Windows or Mac) or Excel for the web. The steps below use the desktop app; the same formulas work on the web, but the ribbon wording can differ slightly.
- Both tabs in the same workbook. Formulas cannot reach a different file without extra setup — see the FAQ.
- For lookups, a key column present in both tabs (an ID, name, or email that appears in each).
- Consistent, clean sheet names. If a tab name contains spaces or punctuation, see the quoting note in Step 3.
Menu labels and dialog wording can differ slightly by version, device and region, so if a label does not match exactly, look for the closest equivalent.
Step-by-Step
- Decide what you are pulling. If you need one specific cell, use a direct reference. If you need the row that matches a value, use a lookup. If you need a whole column to appear beside existing data, a lookup dragged down is usually the answer.
- Make sure the sheet name is known. Look at the tab along the bottom of the window. The name is exactly what the formula will use — avoid renaming the tab later, because renaming a sheet with a space or special character in the new name can break references that were written without quotes.
- Write a direct reference. Click the cell where you want the value, type
=, click the other tab, then click the source cell and press Enter. Excel produces something like=Sheet2!B4. The part before the exclamation mark is the sheet name; the part after is the cell. If the sheet is called Q1 Sales, Excel writes it as='Q1 Sales'!B4— the single quotes are required whenever the name contains a space or symbol. - Copy it down or across. Drag the fill handle (the small square at the bottom-right of the cell) down a column. To build a block that spans several columns and rows, use a mixed reference first:
='Q1 Sales'!$B4locks the column so dragging right keeps reading column B, while the row still moves down. - Use VLOOKUP for a matching pull. With the key in A2, type
=VLOOKUP(A2,'Q1 Sales'!$A$2:$D$200,3,FALSE). This reads as: find A2's value in the first column of the other tab's range, then return the value from the third column of that range. TheFALSEat the end forces an exact match — do not useTRUEfor text keys. - Use XLOOKUP if your version has it. The syntax is
=XLOOKUP(A2,'Q1 Sales'!$A$2:$A$200,'Q1 Sales'!$C$2:$C$200)— a lookup column and a return column, so the return column can sit to the left of the key. XLOOKUP also has an optional fourth argument that supplies a value when nothing matches, such as"Not found". - Lock the source range. Press F4 (or Fn+F4 on some laptops) right after typing a range reference to add the dollar signs. This is what makes a formula safe to copy down thousands of rows.
- Fill the formula down. Double-click the fill handle to copy to the bottom of the adjacent data, or drag it. Check a middle row to confirm each row is pulling its own key, not repeating the first one.
- Validate a sample. Pick two or three rows, look up the same value by hand on the other tab, and confirm the numbers or text match exactly.
Common Mistakes
Forgetting the quotes around a spaced sheet name. =Q1 Sales!B4 is not a valid formula; it must be ='Q1 Sales'!B4. Excel will offer to fix it, but trusting the prompt blindly can rename things unexpectedly.
Leaving the range unlocked. Type A2:D200 without dollar signs, drag down, and the range slides out of position — the bottom rows start pointing at empty space. Locking with F4 prevents a whole class of silent errors.
Using approximate match in VLOOKUP. Omitting the fourth argument, or entering TRUE, makes Excel hunt for the nearest value instead of an exact one, which returns plausible-looking but wrong results with text keys.
Counting the VLOOKUP column wrong. The third argument counts the column's position inside the range, not in the sheet. If the range starts at column B, the third column is D, not C.
Pulling a display value instead of a real number. If the source cells are stored as text (a common import problem), SUM will show zero even though the values look correct. Select the source column, use Data > Text to Columns and click Finish, or multiply by 1 to coerce text numbers into real ones.
Referencing a cell that holds a formula returning blank. A direct reference to an empty cell shows 0. Wrap it: =IF(Sheet2!A1="","",Sheet2!A1).
Tips
- Name your source ranges once (Formulas > Define Name), then write
=XLOOKUP(A2,SalesKeys,SalesPhones)instead of chasing long sheet references. - Press Ctrl+[ to jump straight to the cells a formula depends on, which is the quickest way to audit a suspicious pull.
- Use
=SUM('Q1 Sales'!B2:B200)to total a whole column from another tab without copying anything across. - Keep the key column as the first column in a VLOOKUP range, and delete trailing spaces from both sides with TRIM before comparing.
- Convert the result range to a table on the source tab so ranges grow automatically as rows are added.
Troubleshooting
#REF! error. The source tab was deleted or renamed after the formula was written, or the reference points to a deleted column. Type the reference again by clicking the source cell rather than editing the old text.
#N/A in a lookup. The key exists but does not match exactly — extra spaces, a number stored as text versus a real number, or a different case. Compare both values with =A2=Sheet2!A10; if that returns FALSE, the values are not identical even if they look so.
#VALUE! or #NAME?. Usually a missing quote, an unbalanced bracket, or a function name the version does not support. Excel underlines the offending part in the formula editor; fix one piece at a time.
Formula shows as text. The cell is formatted as Text. Change the format to General and re-enter the formula — pressing Enter alone will not recalculate it.
If that did not work. Save and reopen the workbook, check Calculation Options is set to Automatic under Formulas, and test the same formula on a scratch sheet with a single cell to confirm the reference style is being written correctly.
Frequently Asked Questions
Can a formula pull data from a different workbook?
Yes, but the workbook must be open or the formula must include the full file path, written like =[Book2.xlsx]Sheet1!A1. If the file moves, the link breaks and Excel asks you to update it. For a permanent connection, use Data > Get Data instead of a formula.
What is the difference between VLOOKUP and XLOOKUP?
VLOOKUP searches only the first column of a range and returns a column to its right. XLOOKUP takes a separate lookup and return range, so the result can be anywhere, and it handles missing values with a built-in fallback.
How do I pull data by matching two columns?
Use SUMIFS or COUNTIFS across sheets, for example =SUMIFS('Q1 Sales'!C:C,'Q1 Sales'!A:A,A2). For text, use INDEX with MATCH, or XLOOKUP.
Why does my reference return 0 instead of blank?
The source cell is empty and Excel treats a blank as zero. Wrap the reference in the IF test shown in Common Mistakes to return an empty-looking cell.
Does renaming a tab break the formula?
Not automatically — Excel updates references when a tab is renamed normally. It breaks if rows or columns are cut and pasted elsewhere, or if the sheet is deleted.