Excel: Linking sheets and summary sheets
To make the content of one cell appear somewhere else
•
•
To build formulae across Excel files
•
Click in the destination cell and type =
screen together using View >> Arrange All (see previous section)
Click on the cell whose content you want to pull in and press ENTER
•
To build formulae across worksheets
•
•
Click where you want your formula to appear and start to build the
formula
•
Start to build your formula
When a cell reference from another sheet is required, simply click to
When a cell reference from another file is required, click anywhere on
the file to activate it.
•
•
select the required worksheet, then click on the cell you require
•
Open all the Excel files to be used in the formula and view them on the
You will lose visibility of the formula in the worksheet, so continue
building the formula in the formula bar at the top of the worksheet.
Click to select the required worksheet, then click on the cell you require
Continue building the formula in the formula bar at the top of the
worksheet.
File names will appear in the formula as [filename.xlsx]
Moving chart location
Worksheet names will appear in the formula as ‘worksheetname’!
e.g. to make them appear alongside other data on a summary sheet:
•
•
•
•
To view multiple Excel files on the screen together
Useful when building formulae across workbooks:
•
•
•
Open the files in Excel
On the View tab, click on the Arrange All icon.
Choose your preferred option (e.g. Horizontal) and click OK.
Click on the chart to select it
On the Chart Tools Design tab, click on Move Chart
Click to select the Object in radio button
Click on the drop down to select the
worksheet you want the chart to appear
on.
The Excel files will all be visible on the screen. Only one will be active at
Hiding grid lines
any one time. The active workbook can be identified by:
•
e.g. to build a summary sheet that looks a bit like a dashboard:
•
•
the Excel logo by the filename at the top left of that
workbook
•
the Maximise, Minimise and Close icons at the top
Click on any cell in the worksheet.
On the View tab, click to deselect the Gridlines checkbox.
right of that workbook.
Last updated December 2015
Information Services documents are online at: https://staff.brighton.ac.uk/is/training
Faye Brockwell
1
Naming worksheets
Autofill to copy formula to other cells
Naming your worksheets makes it easier to read formulae across
• Select the cell(s) you want to copy. The fill
worksheets or files. Use short names.
handle will appear at the bottom right of the
•
selection
bottom of the screen (e.g. Sheet1)
• Point at the fill handle until it becomes a cross.
•
Click and drag to copy the data OR Double-click to autofill all rows
•
Click on
Double click on the worksheet’s tab at the
•
to change the type of fill (series, copy, formula only etc.)
Type the new name of the worksheet and press ENTER.
Note, this step is NOT the same as naming a cell range to use in a formula
Absolute cell referencing to avoid problems when autofilling
such as VLOOKUP.
Absolute cell references are used when a formula references a cell/cells that
Adding cell borders
must remain the same even when a formula is copied to other cells in the
This is useful when printing a worksheet or if you have hidden the gridlines
worksheet (e.g. using autofill).To make a cell reference absolute:
•
Click on the cell containing the formula
•
Click once on the cell reference in the formula bar
•
Press F4 until the cell reference meets your requirements (see
on a worksheet to create a dashboard.
•
borders to.
•
Original cell
reference...
...when copied
becomes
D2
E4
D$2
$D$2
On the Home tab click on drop down
arrow on the Border button
below)
$D2
Select the cells that you want to add the
$D4
E$2
$D$2
•
Effect
Both the column and the row coordinates change
as the formula is copied
The column coordinate is fixed, but the row
coordinate changes
The column coordinate changes, but the row
coordinate is fixed.
Both the column and row coordinates remain fixed
Name cells or ranges
This technique can be used as an alternative to using absolute references
when building VLOOKUP functions
•
Select the cell or range you want to name
•
Click in the Name box (left of the formula bar)
•
Type the name and press ENTER
To use, simply type the name wherever you would use a cell or range
reference in a formula. E.g. =SUM(Wages)
2
Click to choose All Borders
Using VLOOKUP to pull data from another table
Where several spreadsheets use the same data, it is useful to have one
master sheet holding that data and then allow the other sheets to reference
that information using the VLOOKUP function. This allows you to maintain
data centrally. Any updates will automatically update the other sheets.
VLOOKUP is also useful where the data you want is held in 2 or more tables
downloaded from CAMS and you want to link them together or compare
them.
Note that in Excel 2013 PowerPivot offers an alternative to VLOOKUP.
In the example below, a VLOOKUP in column K uses the mark in column J
to locate the corresponding grade in the second spreadsheet.
Preparing your data for VLOOKUP
For VLOOKUP to work, the master lookup table must be sorted by the key
field (i.e. the field common to both tables).
The master lookup table can be identified as the table with unique values in
the key field column, ie each value only appears once.
It is also useful (but not essential) to name the lookup table as it makes it
simplifies the build of VLOOKUP formula.
3
Building the VLOOKUP
The format of the VLOOKUP function is:
=VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
The key field on the current sheet.
i.e. the cell containing the text or value in the current sheet that you want to check for in the other table
Lookup_value
•
Usually a cell reference on the same worksheet and in the same row as where you are building the VLOOKUP
In our example on the previous page, the Mark is the key field as it is the value that appears on both tables.
The name or cell range of the master table you want to check against.
Table_array
•
The first column in the range must contain the key field where you will look for the lookup_value.
•
The table must be sorted on the key field.
•
Cell references should be made absolute using $ signs (or you can name the table beforehand).
The number of the column in the master table (table_array) containing the text or value that you are looking for (counting across from the
first column).
Col_index_num
•
Do not use column letters here.
In our example on the previous page, the Grade is held in column 2 on the master table.
Used to specify whether you are only interested in exact matches or closest matches.
Range_lookup
•
Type FALSE to look for exact matches only
If no exact matches are found, Excel will display #N/A as the result of the VLOOKUP
•
Leave blank to find closest match.
4
VLOOKUP Example
Use insert function (formula builder) to make VLOOKUP easier
We have this sheet containing student marks:
•
Start to type your formula until the first bracket e.g. =VLOOKUP(
•
On the formula bar, click on the function button
•
The pop-up window splits the formula into its arguments
•
To select cells to add them to the formula click on the
icon to jump
back to the worksheet. To return to the formula builder after selecting
cells click on the
icon again.
And this sheet (called Grades & Check Digits) containing the marks scheme:
MATCH function
Match can be used as an alternative to VLOOKUP to check if the content of
a cell exists in another table.
If MATCH finds a match, it will return the position of the match in the list.
If not match is found, #N/A will appear as the result of the formula.
In cell K2 on the first sheet we have built the VLOOKUP function below to
find the correct grade by:
•
The format of the MATCH function is:
searching for the mark in cell J2 on the first sheet in the list of
=MATCH(lookup_value,lookup_array,match_type)
marks on the second sheet,
•
reading across on the second sheet to find the corresponding grade
The cell reference of the key field in the current row
in column 2:
(this is usually on the same worksheet and in the same
=VLOOKUP(J2,'Grades & Check Digits'!$A$2:$C$102’,2,FALSE)
Lookup_value
J2 - We are building a VLOOKUP to find the Grade
you want to check for in the other table
from the first table against the list of marks in the
The name or cell range of the single column in the table
second table. Cell J2 contains Jill’s mark in the first
lookup_array
table.
Type 0 to look for exact matches only
The second table is cells A2 to C102 on the Grades &
Match_type
Check Digits worksheet
Col_index_num
Range_lookup
you want to check against.
Cell references should be made absolute using $ signs.
'Grades & Check Digits'!$A$2:$C$102’
Table_array
function).
i.e. the cell containing the text or value in this row that
for Jill Shacklock. We need to check for Jill’s Mark
Lookup_value
row as the cell where you are building your VLOOKUP
If no exact matches are found, Excel will display #N/A as
the result of the VLOOKUP.
2 - Counting from the left on the second table, the
Grade we are looking for is in column 2.
FALSE - We only want to look for exact matches.
5
1
Using PowerPivot to pull data from another table (Excel 2013)
Tell Excel which tables you want to link in PowerPivot
• Open the Excel spreadsheet(s) containing the tables of data you
This can be used as an alternative to VLOOKUP if you find it easier.
To be able to use PowerPivot, turn on the PowerPivot add-in:
•
•
•
•
want to link.
• Click anywhere in the first table of data.
Click on File, choose Options, click Add-Ins in the left-hand menu.
• Click on the PowerPivot tab on the Ribbon
In the Manage box, choose COM Add-ins and click Go…
• Click on the Add to Data Model icon
Check the box for Microsoft Office PowerPivot for Excel 2013
• Click the checkbox to say My table has headers and click OK
Click OK
A new Excel window will open, with your table displayed.
• Outside of the new PowerPivot window, back on your Excel file, click
To use PowerPivot:
1.
Tell Excel which tables you want to link in PowerPivot
anywhere in the second table of data.
• Click on the PowerPivot tab on the Ribbon
• Click on the Add to Data Model icon
• Click the checkbox to say My table has headers and click OK
Both tables are now displayed within the PowerPivot window, with their
table names shown on the worksheet tabs.
2
To specify which columns link the two tables:
•
Within the PowerPivot window, in the first table, right–click on the
Note that in the example above, Table 2 is the lookup table, ie it has unique
column header of the column containing the data that is common to
values in the linked column.
both tables (eg the Mark column in Table 1 in the example shown
on the left).
•
Choose Create Relationship.
•
In the Related Lookup Table field, select
the name of the linked table you
want to pull information from.
•
Check that the Related Lookup
Column shows the column in your
second table that is the column
containing the data that is common
to both tables (eg the Mark column in Table 2 shown on the left).
6
3. To pull data from the second table into the first table
•
In the first table, insert a column where you
want the data to appear
•
In the first cell of the new column type
=RELATED(tab
•
In the drop-down list that appears, doubleclick on the field from the second table that
you want to pull into this column
•
In the formula bar, type ) at the end of the
formula and press ENTER
The column will be populate with data pulled from the chosen column in
the second table.
Note: if you have named your tables before starting the PowerPivot, type
the start of the name of the table instead of tab, eg =RELATED(Mar
7
Pulling data from a Pivot Table
The GETPIVOTDATA function can be used to make the content of a cell in a
pivot table appear elsewhere. Rather than build the function yourself:
•
•
Click in the destination cell and type =
Click on the cell in the Pivot Table containing the figure you want to pull
in and press ENTER
The function will have the syntax:
=GETPIVOTDATA("Data_field",Pivot_table,"Field1","Item1")
Data
field
Name of value field from Pivot Table (e.g. the field name that
appears in the Values box on the Pivot Table)
Pivot
table
Cell reference of first cell at top left of the pivot table
Field 1
Name of the summary field for the value selected (e.g. the
Item 1
Content of Field 1 for the selected pivot table sub-total.
field name that appears in row or column labels box)
Example:
Referring to the pivot table shown on the right, the following formula:
=GETPIVOTDATA("Amount",Sheet1!$A$3,"Project","Sausages")
Would pull:
•
•
the Amount field
from the Pivot Table that starts in cell A3 on Sheet1 of our
workbook
•
where the Project = Sausages
To make the function more flexible, you can change the Item1 reference to
i.e. in our example on the right, this would pull the value 760.85.
be a cell reference rather than an absolute value. This will allow you to copy
the formula down a column using autofill to pick up other Item1 value.
8
IFERROR to eliminate error values
The format of IFERROR is as follows:
=IFERROR(value,value_if_error)
When using functions such as GETPIVOTDATA or VLOOKUP, the result of
the function will be an error if Excel finds no match. This will show in the cell
where:
as #REF or #N/A.
•
Such results may cause problems if the data is to be used in a calculation or
Value is the nested function (e.g. the GETPIVOTDATA function in the
example above)
•
in conditional formatting.
Value_if_error is what you would like to appear in the cell instead of
#REF! or #N/A if the result of the function is an error.
For example, in the sheet below a GETPIVOTDATA function has been used
to pull the data in column G from a pivot table on a different sheet.
So, in our example above, the GETPIVOTDATA function in cell G2 with the
IFERROR wrapped around it would look like this:
=IFERROR(GETPIVOTDATA("Amount",'Pivot table by project'!$A$3,"Project",A2),0)
The text in red above is the original GETPIVOTDATA function. All that has
been added to that function is:
Cell G2 contains the function (which has then been copied down column G):
•
IFERROR( between the = and GETPIVOTDATA
•
,0) at the end of the GETPIVOTDATA function (after the closing
bracket)
=GETPIVOTDATA("Amount",'Pivot table by project'!$A$3,"Project",A2)
When copied down the column, in the example above, G3 shows as a
The result of this function in cell G3 is #REF! as there is no data in the pivot
numeric value, which in turn resolves the problem with the total in G8, as
table for that project. This causes a problem for the total in cell G8 as #REF!
shown below.
is not a number.
To avoid this problem, the IFERROR function is used. IFERROR is added as
a wrapper around another function. If the result of the nested function is
FALSE, IFERROR replaces the resulting #REF! or #N/A with a value that
can then be used in calculations or conditional formatting.
9
© Copyright 2025 Paperzz