Working across worksheets: practice exercises
Sheet2!A1, 'Sheet name'!A1, totals and lookups from other sheets. 5 exercises on real-looking data, each checked as you go. The full lesson is part of Pro.
This lesson's exercises use a workbook with several sheets, so they open in the lesson rather than here.
How it works
A workbook can hold several worksheets, shown as tabs along the bottom. A formula can use cells on another sheet: put the sheet's name and an exclamation mark before the reference, as in Prices!B2 or SUM(Sales!C2:C21).
If the sheet's name has a space in it, put it in single quotes: 'Staff list'!A2. The easy way is to let Excel write it: while typing a formula, click the other sheet's tab, then click or drag across the cells you want.
=Sheet2!A1 =SUM(Sheet2!B2:B9) ='Sales data'!C5
Sheets in a workbook
A workbook is a file; each worksheet in it is a separate grid, with its name on a tab at the bottom. People often keep raw data on one sheet and summaries on another.
To use another sheet's cells, write the sheet's name and ! before the reference:
=Prices!B2: cell B2 on the Prices sheet.=SUM(Sales!C2:C21): a range on the Sales sheet.='Staff list'!A2: quotes round a name with a space.
Let Excel write it
You don't have to type sheet names. While you're typing a formula:
- Type up to where the reference goes, for example
=B2*. - Click the other sheet's tab. Your formula stays in the formula bar.
- Click the cell (or drag across the range). Excel adds
Prices!B2for you. - Press Enter.
It works the same here: the tabs are under the grid.
When a formula is copied down, a reference to another sheet moves just like any other, unless it's locked with $.
Looking up a price on another sheet
Say A2 on the order says Pens, and on the Prices sheet Pens is on row 5 with £1.20 next to it. You want £1.20 in B2, and the right price on every other row when it's copied down.
=VLOOKUP(A2,Prices!$A$2:$B$11,2,FALSE) does that. It looks down the first column of A2:B11 on the Prices sheet for what's in A2, and finds Pens. Then it gives the value from the 2nd column of that row: £1.20. FALSE means it must find that exact item.
Lock the table with $ so it stays put when the formula is copied down. VLOOKUP has a lesson of its own in the Looking things up unit.
What you'll practise
- The Prices sheet lists the price of each item, in the same order as this order form. In C2, work out the cost of each line: the quantity times the price from the Prices sheet.
- This is the Summary sheet. In B2, add up all the amounts in column C of the Sales sheet.
- There is a sheet for each month, Apr, May and Jun, laid out the same way. In B2, add up each team's sales across the three months.
- This order is in no particular order. In B2, use VLOOKUP to find each item's price on the Prices sheet (items in A2:A11, prices in B2:B11).
- In B2, count how many people on the Staff list sheet are in each team. The sheet's name has a space in it.
Guides with worked examples: VLOOKUP from another sheet in Excel · VLOOKUP: a simple worked example