Upload
googlefreak007
View
114
Download
0
Embed Size (px)
Citation preview
Table of contents
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
1
Table of contents
Table of contents 1 1 Interior Databases 3
1.1 Guiding lines in order to create a database ................................................ 3 2 Lookup&reference 5
2.1 Record locating using the reference and lookup functions ......................... 5 3 Text Functions 17 4 Database functions 19 5 Date Filtering – Advanced actions 26 6 – Interim summing up 31
6.1 Building automatic interim summing up reports........................................ 32 6.6 Removing the Subtotals ............................................................................ 33 6.3 Creating more than one interim summing up criterion ............................. 33
7 – Working with detailed levels 35 7.1 Automatic level outline .............................................................................. 35 7.2 Manual outline .......................................................................................... 36 7.3 Canceling an Outline ................................................................................ 36 7.4 Changing the database structure while in outline mode ........................... 37 7.5 Data sorting while in outline ...................................................................... 38
8 – Consolidated Reports 38 8.1 A simple consolidating .............................................................................. 38 8.6 Consolidate by location or category ......................................................... 39 8.3 Consolidating while saving the data relations with the original ................ 40
9 – PivotTables and PivotCharts 41 9.1 Creating a PivotTable using a list of data ................................................. 41 9.2 Options Tab .............................................................................................. 44 9.3 Design tab ................................................................................................. 50 9.4 Displaying the summarized details ........................................................... 50
11 The Excel Program Adjustments 52 10.1 Customize Quick Access Toolbar ............................................................. 52 11.6 Default directory for Excel files ................................................................. 53 11.3 Different definitions in Excel ..................................................................... 54 11.4 Formulas with loop calculations ................................................................ 55
11 Cooperative workbooks 55 11.1 Password based sharing .......................................................................... 56 11.6 Removing a password .............................................................................. 57 11.3 Shared databases ..................................................................................... 58 11.4 Conflicted data alert .................................................................................. 60 11.5 Accepting and rejecting changes .............................................................. 61 11.6 Who is working on the database? ............................................................ 62 11.7 Emailing a file for review ............................. Error! Bookmark not defined. 11.8 Protection of the sheets and workbook .................................................... 62 11.9 Protecting a sheet in a workbook ............................................................. 64 11.11 Releasing cells in the sheet from the sheet protection ............................. 65 11.11 Release a graphic object from the sheet protection ................................. 66 11.16 Concealing Formulas ................................................................................ 68 11.13 Concealing sheets and workbooks ........................................................... 68
16 Formulas – linking and advanced actions 70 12.1 How the link is displayed .......................................................................... 70 16.6 Saving and opening linked workbooks ..................................................... 72 16.3 Updating links between workbooks .......................................................... 73 16.4 Saving a workbook with connections to a very large source file .............. 75
13 Scenario Manager 76 13.1 The scenario toolbar ................................... Error! Bookmark not defined.
Table of contents
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
6
13.6 Creating a scenario ................................................................................... 76 13.3 Editing scenarios ...................................................................................... 77 13.4 Displaying scenarios ................................................................................. 78 13.5 Deleting scenarios .................................................................................... 78 13.6 Protecting a scenario ................................................................................ 79 13.7 Merging scenarios .................................................................................... 80 13.8 Scenarios summary report ........................................................................ 81
14 WHAT - IF 83 14.1 Goal-Seek ................................................................................................. 83 14.2 A table to predict numbers (sensitivity analysis table) .............................. 86 14.3 Expedition of calculation ........................................................................... 89
15 SOLVER 90 15.1 Terms ........................................................................................................ 90 15.6 Models ...................................................................................................... 92 15.3 The Solver Reports ................................................................................... 93 15.4 Different options in solving question with the Solver ................................ 94
16 Statistical analysis 95 17 Data exchanging with other programs 96
17.1 Assimilating Objects ................................................................................. 96 17.6 Printing a pasted object ............................................................................ 97 17.3 Edit an Object ........................................................................................... 98 17.4 Inserting an image .................................................................................... 98 17.5 Converting object to other formats ........................................................... 98 17.6 Object Linking ........................................................................................... 99 17.7 Controlling the links ................................................................................ 100 17.8 Web queries ............................................................................................ 100
18 An online or printed Form 104 18.1 Command button types in the toolbar: .................................................... 105 18.6 Data Validation ....................................................................................... 112 18.3 Protecting the form from changes .......................................................... 113
19 Macro 115 19.1 Creating a Macro using the recorder ...................................................... 115 19.2 Changing links references ...................................................................... 116 19.3 Executing a macro .................................................................................. 117 19.4 The macro module sheet/editing the macro ........................................... 119
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
3
1 Interior Databases
Rows of data that are organized in identical form with a common denominator are
called a "list". A list is a type of a database in Excel sheets.
In order to transform a list into a database in the electronic sheet, the list has to
include columns names in the list first row.
Every data row (except for the lists' title row) is called a "record".
Every record of the list is assembled from "fields", as many as the columns of the
list.
A "field" – holds a data of some kind.
1.1 Guiding lines in order to create a database
The excel program has several tools that allow, automatically, to manage and
analyze data out of the databases.
In order to use these tools efficiently, it's important to follow several principles:
1. Each sheet should contain only one list! (The filtering mechanism cannot handle
more than one list per sheet).
2. The list should be differentiated from any other data in the sheet by at least one
empty row and column.
3. Make sure that the lists' first row includes the column titles, in order to allow for
data searches, data organization and the initiation of reports.
4. Distinguish the list header row by using a different styling on the header than on
the rest of the list.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
4
5. In case you want to distinguishably style the header, DO NOT use a blank row,
but use the "border" styling option, in order to draw lines.
6. Refrain from entering blank spaces in the beginning of cells, in order to avoid
disorder when sorting and searching for data.
7. In case you would change the data format, make sure that you keep the same
format for the entire column.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
5
2 Lookup&reference
2.1 Record locating using the reference and lookup functions
It is possible to locate data from a record by using different data from that record that
is known to the user, as criteria.
For example: What is the salary of a sales person whose ID number is 1234567.
We will use these functions when we need to calculate a formula using the desired
data.
These functions return a single value and not the full record.
VLOOKUP- This function seek a value in the first column (usually the left one) of the
data area we have marked (A value for the criteria) and return a single value data in
the same row from the desired result column we have indicated while building the
function (the value we look for).
The function syntax:
VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
For example: in the following table we would like to find what is the salary of a sales
person (the value we seek FOR), using his ID number (the value we seek BY).
Across the database table we have build a search table with only two cells: ID
number and salary. We will locate the function under the header SALARY.
It is possible to first build the function and then to type the ID number under the
header ID number, or first type the ID number and only afterwards build the function.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
6
We will click on the function button in the formula bar and choose the VLOOKUP
function from the lookup and reference Category.
After clicking the button, we will see the next windows:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
7
Lookup_value – In this field we will indicate the value upon we are searching (in the
example above, we have filled the cell H3 as contains the ID number).
In this field we can fill the value itself (for example: 25798799) or a
reference to a cell, which allow us an easy and fast modification as
needed for the value we are looking for (for example: if we would want
to check another person‟s ID number, we would be able to fill cell H3
with another ID number, and after we click on ENTER, the result will
change to display the salary of the person in the same record as the
ID number we entered in H3).
Table_array – The table area to search the value in, starting from the column
containing the lookup value up to the last column of the value we are
looking for (including the latter), including the header row.
Attention!
You must start the Table_array from the column of the lookup value in
order for it to be the first column of the array.
In a case that the lookup value is not the first column of the complete table, start
to mark the table array from that column as if it was the first column of
the table.
Or use other functions like: Match and Index
Col_index_num – The number of the column that contains the value we are looking
for, that is the result of the function (For example: the result we are looking for is the
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
8
Salary, the salary column is the 4th column in the table array we had just marked.
Therefore, in the Col_index_num we shall put the number 4).
Range_lookup – A logical field. Contains one of two values:
FALSE or 0 – for an exact comparison of the looked up value to the data in the table,
the function will pull out a value only if it‟s included in the first column.
TRUE or 1 – In a case that the exact value will not be found, the function will pull
out the closest value to the wanted one but still less than the
requested – the closest one underneath it.
Attention!
Before using the “TRUE” option, you must pre-sort the table (all the
columns), according to the lookup column (usually the first column in
the table).
For example: when looking up a product code – you must pre-sort all
the table ascending according to the product code.
Another example for VLOOKUP:
In this database we would like to calculate the bonus that each customer
deserves, according to his deposit type. Each type of deposit deserves a different
bonus.
In order to do so, we would create an assisting table (in the same or in a different
sheet) that will contain the following:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
9
Now we will build the VLOOKUP function in the cell under the header “Bonus for
each type” in the first table. The syntax of the function will be as followed:
In the field Lookup_value, we have chosen the cell containing the
deposit type for the first customer on the list.
In the field Table_array we have marked the table containing the
types of deposits and the bonus for each type. The array must be
fixated since we are going to copy the syntax for all customers in the
table.
In the field Col_index_num we have placed the number 2 since the
bonus level (the result we are looking for) is indicated in the second
column of the table array.
In the field Range_lookup we have placed a 0 for an exact value.
After clicking the button, we will have the result, according to the first
customer. Now, all we have to do is to drag the function to the rest of the table, in
order to get the results for the rest of the customers.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
11
Another example for VLOOKUP using a “TRUE” Range_Lookup
In the next table we would like to know the bonus that each sales person
deserve, based on his salary:
In order to do so, we would have to build an assisting table. Here are the criteria‟s
for the bonus:
In order to build an assisting table, we have to decide which value to put in the
salary column – the lowest of highest of the range. We have to write the lowest
value in the range. Meaning: if we have a 150 bonus for salary range 1001-1500,
we have to write 1001. When we use the function to look for a bonus for a 1200
salary, the function will find the closest value from below (which is 1001). This is
the right range where we will find the bonus for a 1200 salary.
Therefore, the table will be as followed:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
11
Now we will build the function under the header “Bonus” in the table. The
function will look like this:
In the field Lookup_value, we have chosen the cell containing the
salary of the first salesman on the list. In our example – David
Cohen‟s.
In the field Table_array we have marked the assisting table containing the
bonuses for each salary range. The array must be fixated since we are
going to copy the syntax for all salesmen in the table.
In the field Col_index_num we have placed the number 2 since the bonus
level (the result we are looking for) is indicated in the second column of the
table array.
In the field Range_lookup we have placed a 1 in order to find the range of the
salary, since we are looking for a range and not an exact value.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
16
NOTE! The function HLOOKUP is identical to the function VLOOKUP,
except that HLOOKUP is referring to rows instead of columns.
MATCH - Using this function we can receive the record number containing the data
we seek. The function returns the relative location of an item in an array, compatible
to the value we seek in the order we indicated. We will use the MATCH function
instead of a LOOKUP function when we would like to get the location of a value in
the array, and not the value it self.
The Function syntax: MATCH(lookup_value,lookup_array,match_type(
We will click on the function button in the formula bar and choose the MATCH
function from the lookup and reference category.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
13
After we click on the button, we will receive the following window:
Lookup_value – The value that it‟s location we are seeking.
Lookup_array – The column range containing the value we are looking for it‟s
location.
Match_type – Containing one of three values:
1 – The search will locate the closest value and smaller than the
one we seek (have to be ascending sorted).
0 – The search will locate the first exact match for the desired value
and if it doesn‟t find such a record – we will receive no result.
-1 – The search will locate the closest value and larger than the one
we seek (have to be descending sorted).
For example:
In this table we would like to find a sales person‟s record number using his ID
number. For this we have built an assisting table including the ID number and a
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
14
record number. We will build the MATCH function under the header “Record number”
in the assisting table.
In the field Lookup_value of the function, we will choose the cell that contains (or
will contain) the ID number, in this example it‟s cell G3. This text box can be filled
with a value (like 25798799) or a reference to a cell (like G3)
In the field Lookup_array , we will mark the array of all Salesmen‟s ID numbers,
in this example it‟s A1 to A10 (don‟t forget to firmly fix the cells if you are going to
copy the formula to other cells).
In the field Match_type , we will place a 0 for an exact result.
INDEX – This function pull out a value according to the row and column numbers we
have defined.
Function Syntax: INDEX(array,row_num,column_num(
Array – The array range to pull the result out from.
Row_num – The row number to pull the result out from (Usually the result we got
from the MATCH function)
Column_num – The column number to pull the result out from (If we choose only
one column in the array field, these is no need to fill this field)
For an example:
In this table we would like to pull out the name of a salesman according to his ID
number. For that we have build an assisting table with 3 columns:
Record number – the row number for the ID inserted in G3 (This was found using the
MATCH function in the previous page).
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
15
ID number – Here we fill the ID number for the salesman we would like to find.
Name – Under this heading we will build the following INDEX function:
Array – In this field we will mark the column range where we want to find the result.
In our example it is the salesman name so we will mark column B.
Row_num – In this field we will refer to the cell containing the row number. In our
example this cell is H3.
* Because we marked only one column in the Array, we do not have to fill the
Column_num field as well.
This function will find the cell in the result column (The name) in the row number that
is indicated in the Row_num field.
Another Example – a MATCH function inside of an INDEX function
We can do the same lookup as in the previous example, using only one function.
Now we will build the MATCH function inside the INDEX function.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
16
The INDEX function will look like this:
In the Array field we will mark the column array where to look for the result.
In the Row_num field we would click on the list arrow in the formula bar to see more
functions:
In that list we can find the MATCH function, and if it‟s not on the list, we can click on
the “More Functions…” option and locate the MATCH function there.
After we choose the MATCH function, the function windows will open and we will fill it
with:
Lookup_value – Cell G3, where the ID number (of the salesman we are looking for)
is located in.
Lookup_array – The salesmen name column array.
Match_type – 0 for an exact result.
To finish, we will click on the button and receive the wanted result.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
17
3 Text Functions
CONCATENATE – Used to concatenate several text strings into one.
Function Syntax: CONCATENATE ) text1,text2,…)
For an example:
If we have a table with two columns – “first name” and “last name”. We would like to
create one column that includes in each cell both the first and last names. We will
use the CONCATENATE function:
This function can be found in the Text category from the functions window:
In the Text1 field, we will choose the first cell under the header “First Name”
In the Text2 field, we will put a blank space – inverted commas one space
inverted commas.
In the Text3 field (that was added when we filled Text2 field), we will choose the first
cell under the header “Last Name” in the table.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
18
After we will click on the button, we will receive one cell containing both
First and Last Name.
Now we can copy the function to all the other cells in the table.
LEFT - This function return the first one or more characters in a chosen text string,
according to the entered number in the syntax.
Function Syntax: LEFT(text,num_chars (
For Example: If we have a cell with a long name and we want only the first 3
characters.
In an empty cell we will build the LEFT function:
In the Text field, we will choose the cell containing the text string we want to cut. In
this example it‟s cell E21.
In the Num_chars field, we will indicate the number of characters we want to cut from
the string. In this example we wanted 3 characters.
Attention!
The RIGHT function does exactly the same action – return a wanted number of
characters from a text string but from the end. For example, if we would have wanted
the last 3 characters of the city name, we would have used the RIGHT function
instead.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
19
4 Database functions
When we want to use a database function, we have to make sure that the data we
have is located in a legal database.
The database functions are found in the function window.
The principle of the date base function:
Performing a calculation like – sum, average, counting – on a data column that meet
a certain criteria.
For example: we want to sum all the salaries of all employees over the age of 25:
Building the criteria zone – one criterion:
First we will build a criteria zone where we will write all our criteria‟s. The zone will be
assembled from a header and the criteria underneath it.
The header must be identical to the header of the database column!
For example:
Now we will choose a blank cell to display the result in, and build the DSUM function.
DSUM – Summing all numbers in a chosen column or database, that fulfills a defined
criterion.
Function Syntax: DSUM)database,field,criteria (
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
61
The function will look like this:
Database – The full database– marking the entire table, includes the header.
Field – Marking the header of the calculated column. In our example, we would mark
the header SALARY that is in cell C1.
Criteria – The criteria that will be used in the function in order to chose the calculated
numbers. In our example, we would mark the criteria zone we have made – the
header AGE and the criteria beneath it.
After we would click on the button, we would receive the requested sum
(salaries for employees over the age of 25).
Calculating using several criteria’s
It is possible to combine more than one criteria together in a logic relations of “AND”
or “OR”. If we would define several criteria‟s in the same row – it will be considered
as an “AND” relation (see example 1) and the function will choose cells that meet all
the criteria‟s together and than calculate. If we would define several criteria‟s in
different rows (but still in side the criteria zone) – it will be considered as an “OR”
relation and the function will choose cells that meet at least one of the criteria‟s and
than calculate (see example 2).
Example 1 (an AND relation): We will add another column named “department” to
the table and use the function in order to calculate the average salary for all
employees older than 25 years AND work in the HR department:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
61
Since the criteria‟s were written in the same row, one next to the other, the relations
between them are “AND”, that means that we will get calculation of employees that
are older than 25 years AND work in the HR department.
Now we will build the function in a blank cell. In order to calculate the average of the
employees meeting the criteria‟s, we would use the DAVERAGE function that is in
the database category.
Function Syntax: DAVERAGE (database, field, criteria (
The function will look like this:
Database – in this field we have marked the entire table, including the header.
Field – In this field we have marked the header of the column we would like to
calculate. In our example, we would like to calculate an average of salaries, so we
will mark the header “salary”.
Criteria – In this field we mark the criteria zone – including headers and conditions.
The result will include only records that meet both the criteria‟s.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
66
Example 2 (an OR relations): We will add another column named “Car” to the table
and we would now COUNT how many employees are from the HR department OR
own a BMW car.
The table and criteria zone will be as followed:
Since the criteria‟s where written in different rows, the relations between them will be
an OR. We will count all employees working in the HR department OR own a BMW
car. It‟s possible to have an employee that meet both conditions (like David Cohen) –
he as well will be counted.
We will build the function in a blank cell. In order to count the employees meeting the
desired criteria‟s, we will use the DCOUNTA function that can be found in the
database category.
Function Syntax: DCOUNTA(database,field,criteria(
The function will look like this:
Database – In this field we marked the entire table, including the header.
Field – In this field we marked the header of the column we would like to count. In
our example we would like to count the number of employees based on the column
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
63
names (in this example, we can use each one of the table columns), so we will mark
the header “Name” in the table.
Criteria – In this field we have marked the criteria zone – both header and
conditions.
The result includes all records meeting one or two of the conditions.
Using functions that include a calculated criteria
Sometimes we would like to calculate a result when the criterion is a calculating of
itself and not a simple greater/less/equals/different from a specific criterion. For
example: Calculating the sum of salaries of employees younger than the average
age.
The only different between calculated criterions to the other database functions is the
criteria zone.
When we would like to use a calculated criterion, we have to create a criteria zone
and make sure that the header of that criterion will be different from any header in the
table. Underneath that header we will build the criterion cell.
The principle of a calculated criterion function:
We refer the function to the first cell in the table and it checks in the table one cell
after the other to see is this record meet the condition, if so, this cell will be included
in the calculating.
For Example:
As mentioned, we would want to sum the salaries of all employees younger than the
average age. Meaning: the result will be a sum, so we shall use the DSUM function.
The criterion will be: Age < Average of all ages.
The table and criterion will be as followed:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
64
Building the calculated criterion:
In cell H1 we have written a header name, different from all other headers in the table
(although it looks like a minor detail, but if this header will be identical to any one of
the headers in the table – the calculation won‟t work).
Underneath this header, we will built the criterion:
We start with a = so the program know we are building a calculation, then we refer to
the first cell in the Age column – B2. In this point, we would write the sign < (smaller
than…) and in order to calculate the average age, we would use the function
AVERAGE from the functions list (using the small arrow on the left side of the
formula bar) and in this function we would mark all the cells including the ages
(without the header, of course). This array must be fixed since the up coming
function DSUM will check each and every one of the cells – and check if this cell is
smaller than the average of B2:B8, so in order to do so – it must be fixed.
After we click on the “Enter” key and finish building this function, we will see the
value TRUE (a calculated criterion can show either TRUE of FALSE). In this action,
the function checked if cell B2 is smaller than the average age, found that it is and
the result was TRUE.
The calculation:
Now we will build the function DSUM as previously learned:
Database – In this field we have marked the entire table, including headers.
Field – In this field, we have marked the header of the column we would like to
calculate. In our example, we would like to calculate salaries so we marked the
Salary header.
Criteria – in this field we have marked the calculated criterion we have just build,
including the header.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
65
The result includes the salaries of David, Itzik, Eric, Avi and Tzoori, since their age is
smaller than the average one, which is 24.5.
Predestinated signs for building criteria
Example Meaning Sign
=1200 Value equal to 1200 Equal to… =
>1200 Value bigger than 1200 Bigger than…/ Smaller
than…
<,>
<=1200 Value smaller or equal to 1200 Bigger or equal to…
/Smaller or equal to…
<=,>=
<>1200 Value differ from 1200 Differ from… <>
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
66
5 Date Filtering – Advanced actions
Unlike the AutoFilter, the advanced filter procedures allow us to define more
complicated filtering criteria, including comparative logic parameters and calculated
parameters.
The filter result can be displayed in 2 modes:
1. Instead of the current list. Meaning, all the irrelevant records will be hidden
from the displayed database. We can reshow the full list any time.
2. Creating a new list, by retrieving the relevant records to different calls in this
sheet or any other sheet. The original list is not changed.
In addition, the criterion can be taken from a different area in the sheet, what will give
us an advantage when designing macros to auto filter based on results in specific
cells.
It is recommended to perform preliminary actions before defining an advanced filter:
a. Copy the headers of the table (the names of the fields in the database) to
another area of the sheet. These cells will become the criteria zone.
b. Define the criteria.
The steps in order to filter a list in its original position:
1. Place the cursor on one of the cells in the array you wish to search.
2. On the Data tab, in the Sort & Filter group, click Advanced
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
67
3. Mark the Criteria range.
4. Clink on the button.
Attention! In order to show the full list again, select Data tab, in the Sort & Filter
groupClear
Filter a list while coping it to a different location in the sheet:
In order to filter the list into another area of the sheet you have to repeat steps 1-4
that are mentioned above and continue:
5. In the Advanced Filter dialog box, under the “action” header, select option
“Copy to another location”.
6. In the text box “Copy to:” mark the area you wish to copy the filtered list to.
7. Click on the button.
Coping the filtered list to a different sheet:
Option 1:
Filtering the list in the original place and coping the filtered list into a different
sheet, using a standard copy/paste action.
Option 2:
1. While in the advanced filter dialog box, select the “Copy to
another location” option.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
68
2. Click on the expending bar next to the text box of the “copy to”
option.
3. Browse to the sheet where you want to copy the filtered list and
mark the destination for that list.
4. Close that bar and click on the button.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
69
Comparative criteria
Criteria that allow displaying of records based on comparative index as a search for a
specific text string, values bigger/smaller than…
Merging and parting criteria (OR and AND)
When we want to filter a list based on more than one criteria, we can decide if all the
criteria have to be fulfilled or only some of them/one of them.
When the criteria are written in the same
row, the logic meaning is: AND
When the criteria are written in different
rows, the logic meaning is: OR
For your knowledge: it is possible to use a double criterion for the same condition.
For example: Salary greater than 2000 and less than 5000, by using two columns
with the same header name “salary” in the criteria header.
Predestinated signs for record locating
Example Meaning Sign
="total" Searching for an exact string Searching for an exact string ="=any text"
?ook will locate book, look, hook,
took and ex.
Any single character can
come in that spot
?
*any will locate Dany, Shany, ex.
Jo* will locate Jones, Jonathan, ex.
Any string of characters can
come in that spot
*
=1200 Value equal to 1200 Equal to… =
>1200 Value bigger than 1200 Bigger than…/ Smaller
than…
<,>
<=1200 Value smaller or equal to
1200
Bigger or equal to… /Smaller
or equal to…
<=,>=
<>1200 Value differ from 1200 Differ from… <>
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
31
Calculated criteria
Sometimes we would like to calculate a result when the criterion is a calculation of
itself and not a simple greater/less/equals/different from a specific criterion.
We have to build this criterion in a cell without a header or with a new header (that is
not on that list).
In the following example we would filter the salesmen from the north who sold more
than the total sales of the south.
List before the filter:
The list after the filtering:
This is the
calculated
criterion
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
31
6 – Interim summing up
It is possible to receive interim summing for numeric values in the database.
We have to define 3 items:
1. The criteria of the section.
2. The calculating function. In addition to sum, we can calculate average, standard
deviation and more.
3. The data to be summed.
For example: In the next table, we would like to find the account statement summing
for each status:
a. The criterion – Work status
b. The calculating function – Sum
c. The data to sum – Account Statements
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
36
6.1 Building automatic interim summing up reports
In order to use this option, all data must be arranged in a “legal” list form.
Attention! It is important to sort the data according to the wanted criterion before
summing it. In our example, we would sort the data according to the Work
Status column.
1. Mark the table array
2. On the Data tab, in the Outline group, click Subtotals
The next dialog box would open:
3. At each change in – Choose the interim summing criterion name. In our
example it is the Work status. You can see that it‟s the same column we
have sorted the table by.
4. Use function – Choose the calculating function you would like to use. In our
example it is the Sum function.
5. Add Subtotal to – Choose the data to calculate, the numeric fields to be
counted with the function we have chosen. In our example it is the Account
statement.
6. Click the button.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
33
In the database margins we would see the level dividing signs. Using those signs, we
can hide the records and display only the wanted calculation in the different levels
(Using levels will be explained in the next chapter).
6.2 Removing the Subtotals
In order to return the database to it‟s original display, we need to remove the
subtotals.
1. On the Data tab, in the Outline group, click Subtotals
The Subtotal dialog box would open
2. Click on the button.
6.3 Creating more than one interim summing up criterion
When the database is displaying the summing up according to a certain criterion, it is
possible to add another level of summing up as a sub-category of the same criterion.
Attention! It is important to soft the data before summing it. Sort the data using
several levels of sorting.
In order to display several levels of summing:
1. Perform, once, an interim summing up, as explained in item 2.1 . Pay
attention that the criterion for this summing is the first column you have
sorted.
2. After receiving the subtotals – Perform the same steps in order to get another
level. BUT, before clicking on the button this time, cancel the
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
34
mark in the box named Replaced current subtotals in the dialog box. Pay
attention that criterion in this level is the second column your have sorted
according to.
3. Click the button.
Using these steps, you can build several interim summing ups in any database.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
35
7 – Working with detailed levels
While using the interim summing, the program has automatically created the levels.
These levels allow us to display data and it‟s totals, for our wish. Meaning – you can
show and conceal data for your request.
7.1 Automatic level outline
It is possible to define automatic outline for a part of the sheet. The outline allows us
to sum the data without the use of a permanent interim summing up.
In order to do so, this conditioned must be fulfilled:
1. The data are organized in a fixed format.
2. The summing rows and columns are referring to an attached data (on the left
or below).
3. All summing functions refer to a certain and fixed direction in the array (for
example: the summing is always for the top to bottom).
Steps for level outline:
1. Mark the wanted array.
2. On the Data tab, in the Outline group, click Group AutoOutline
3. The data will be organized in levels.
Level Buttons
The lines appear on the margins are the levels of details. They allow us to display
each level, for our needs.
It is possible to outline up to 8 levels of rows and 8 levels of columns.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
36
7.2 Manual outline
In cases the problem will not be able to automatically outline, it is possible to
manually outline the levels:
1. Mark the array you wish to limit.
2. On the Data tab, in the Outline group, click Group→
3. Choose rows or columns.
4. Click on the button.
7.3 Canceling an Outline
Canceling some of the levels:
1. Mark the rows/columns you wish to cancel their outline.
2. Click on Data tab, in the Outline group, click Ungroup.
3. Select the Clear Outline option.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
37
Canceling all the levels:
1. Click on Data tab, in the Outline group, click Ungroup
2. Select the Clear Outline option.
Attention:
In cases you would like to work with outlines and the outline symbols are disturbing
you, it is possible to hide them without canceling the outline.
Click on Office buttonExcel OptionsAdvanced Display options for this
workbook: and unmark the Outline symbols option.
7.4 Changing the database structure while in outline mode
It is possible that you would want to change the way your data is structured after you
have created outline levels, in order to organize them in an easier structure.
(Especially until you would get used to creating an easy data structure in one try).
Changing the structure is done by gathering and separating rows/columns of data.
In the example, the self employed are displayed; although the minimal detailing level
wanted is the total account statement for employed or unemployed.
In order to prevent the display the unwanted rows, we would group them by:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
38
1. Marking those 4 rows
2. From the tab DataGroup and Outline
3. Selecting the option Group…
4. Now we will define whether we want the rows or columns to group.
5. Clicking the button
We can see that the self-employed are grouped with the hired employed.
7.5 Data sorting while in outline
When we sort outlined data, the program sort the higher level first
Attention: In order to sort an automatic outline, you have to first hide all detailing but
the chapter headers (the higher level of outline).
8 – Consolidated Reports
A consolidated report is joining data from different tables for one or more different
sheets/work books.
Attention: It is possible to create only one consolidated report in each sheet.
8.1 A simple consolidating
1. Browse to a specific cell in the sheet you would like to put the consolidated
report in.
It is recommended that you would choose the upper corner cell of the area you wish
to put the report in (this will be the first cell of the report data)
2. On tab Data in the Data Tools group Consolidate.
3. The Consolidate dialog box would open:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
39
Function – Choose the function you wish to perform during the consolidation.
Reference – Refer to the original table (and sheet) array.
In a case you are trying to consolidate report from an opened
sheet/work book:
Mark the desired sheet, so it‟s details would be in the text box, or first go
to the desired work book (an opened workbook) using the Window
menu. Mark the desired area and pay attention it‟s written correctly in the
text box.
In a case you are trying to consolidate a closed workbook, click on
the button and mark the desired book in the dialog box.
Attention: In this case, the desired report must be in the first sheet in that work book.
Otherwise, you would have to add the sheet‟s name in that book.
For example:
4. Click on the button. The array was added to the All References box.
Repeat these actions in order to add all the wanted sheets.
5. Click on the button.
8.2 Consolidate by location or category
Data consolidating by location
In this case, the consolidating is done according to the data‟s location on the sheet.
It is important that the data in all sheets would be located identically in the same
cells in all sheets.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
41
When consolidating by location, the data header is not important, and all cells are
considered as data.
In this case, there is no need to mark any of the “use label in” boxes.
Data consolidating by category
Consolidating by category is useful when consolidating table with different structure.
In that case we perform the action using the header rows/columns.
In order to do so, we would have to mark the header locating in the “use label in”
boxes.
8.3 Consolidating while saving the data relations with the original
By default, when consolidating data, the relations between the new and original data
are not saved. Meaning, if the original data would be changed, the new one won‟t
show the changes.
In order to save those relations, we have to mark the in the
consolidate dialog box.
* It is recommended to check the consolidated report first by checking it without the
links to the source data (using the default consolidating).
Attention: It is impossible to link to a report in another sheet that has outlines or
already used for consolidated report.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
41
9 – PivotTables and PivotCharts
A pivot table allows us to create a report that unifies all data while defining categories
in an easy and fast way when it‟s possible to change the report display and data
without to change the original data of structure.
It is possible to choose in which functions you want to use without affecting the
original data.
The received report is displayed as a table and is very easy to edit and change.
Moreover, it is possible to display this report as a graphic chart and edit the display
from within the chart.
9.1 Creating a PivotTable using a list of data
1. Mark the desired array or put the cursor in any cell inside the database.
2. On Insert tab in the Table group click PivotTable, and then click
PivotTable.
3. Dialog box would open:
4. Choose the data that you want to analyze in the PivotTable (table/range or
external data source) Make sure that the wanted date is written in the text box
5. Choose where you want the PivotTable report to be place
To place the PivotTable report in a new worksheet starting at cell A1,
click New Worksheet.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
46
To place the PivotTable report in an existing worksheet, select
Existing Worksheet, and then specify the first cell in the range of
cells where you want to position the PivotTable report.
6. Click OK.
IN the Window there are three elements that help to define the report:
1. List of fields and areas of the database. 2. An empty PivotTable report that defines the location of the cells in the
PivotTable 3. Two Tabs, PivotTable Tools - Options and Design (see page 44)
Now you can format the data presented in the report and according to what criteria
will be shown.
Drag the relevant fields listed in the fields where you want the list of areas
Drag the fields that you want to display as column headings into the Column Labels area .For example, drag the field to the column "Deposit type"
Drag the fields that you want to display in the row into the Row Labels area. For example, drag to the line in the "branch"
Drag the field you want Report Filter area, the bellow example: cell A1. For
example, drag the field to the line "Work Status." This field allows to make a pivot table data filtering based on the selected category. For example, if chosen from a field page with different statuses - Employee, then pivot table data will change and it will show data relevant to employee status only.
Drag the fields, on them you want to display summary numeric data, into the Values area. For example, drag the data items to the field "Account
Statements'".
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
43
(The default is to calculate sum of the values in the "values area", see page 45 how to change this setting).
Here is the Example:
The following example show if you chosen work status:"employee"
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
44
9.2 Options Tab
Options - Launch the PivotTable dialog box. See page 44
Expand/collapse all items on the active field
Insert Slicer- filter data interactively
Refresh Data - For updating data if the data have changed in the original list
Move PivotTable - Move the PivotTable to another location in workbook
Filed Setting-Launch the Filed Setting dialog box. See page 46
Pivot chart-Insert Pivot chart based on the data in the Current PivotTable. See page
Formulas – create and modify calculated fields and items. See page
Pivot table options
It is possible to define many options for the PivotTable. For example, we can display
the table without totals of rows and columns.
1. Place the cursor inside the table, on the Options tab in the PivotTable
group click Options
2. The dialog box PivotTable Options will be open
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
45
Primary options:
Grand Totals for columns – Display of totals in the table columns
Grand Totals for rows – Display of totals in the table rows
AutoFormat Table – Will the Pivot table design will be as defined in excel or
manually by us.
Subtotal hidden page items – If we want to include hidden items in the
subtotals
Merge Labels – If we have put labels to the area (InsertNameLabel), this
option will combine the cells in the label area.
Preserve Formatting – to preserve the chosen formatting after we refresh the
display.
Page Layout – the display order for more than one field in page.
For error values show – What to display in a cell with error.
For Empty cells show – What to display in an empty cell.
Data options – options of the data source.
PivotTable fields
In Data area
The default function for numbers is Sum.
The default function for text string is Count.
In a Pivot table, it‟s possible to change the function, according to the data and the
user‟s needs:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
46
1. Stand on a cell that contains a data of a field you would like to edit.
2. Choose option Field Settings in options tab. You will get the
Field settings dialog box:
3. Clicking on the Number Format button will allow you to choose a style for the
numeric cells.
4. In the Summarize Value filed by box, choose the desired function to use.
5. By clicking Show values as tab, you will be able to choose to use a normal
calculation or as an increment of another cell in the database, or as a percentage
of another cell or Show percentage that of field from the total row ex.
6. Click on the button.
Report filter
1. Click on the small arrow next to the Report filter field:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
47
You will get a list to choose which criterion you wish to use to display the table.
2. Click on the desired one and then on the button.
In order to see all data, choose the “All” option from that list.
Select multiple items:
1. Click on the small arrow next to the Report filter field:
2. Check on the possibility Select multiple items at the bottom of the box that opens.
3. Check on the categories that you want to display.
4. Check on
5. You will see on the table only the information for the categories you choose
Dividing page categories to different sheets:
It‟s possible to divide each value of the page field into different Pivot tables, in
different sheets.
1. Put the cursor inside the Pivot table
2. Make sure that in the page field, “All” is chosen
3. click on the small arrow next to the Options tab
4. Click on Show Report Filter Pages Pages…
5. In the new windows, choose the relevant page field (in case you have more
than one) and click on
6. You will now have new sheets; the name of each one is the page field names
.
Insert Slicer
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
48
It is possible also to filter data by using the slicers. Slicers provide buttons that you
can click to filter PivotTable data. In addition to quick filtering, slicers also indicate the
current filtering state, which makes it easy to understand what exactly is shown in a
filtered PivotTable report.
1. Place the cursor inside the table
2. Click on Insert Slicer button in the Options bar;
3. Choose from the window the field you want to filter
4. A little window will open with the items on the field you choose. When you select an item, that item is included in the filter and the data for that item will be displayed in the report. For example, when you select Employee in the Work Status field, only data that includes Employee in that field are displayed.
PivotChart
It‟s possible to display the table as a chart.
In case we have a table already:
1. Place the cursor inside the table.
2. Click on the button in the Options bar.
3. Select the chart you want from the Chart Gallery window.
4. A chart based on your data in the pivot table will be shown
In case we don‟t have a Pivot table already:
1. Mark the desired array or place the cursor inside the database area.
2. On Insert tab in the Table group click PivotTable, and then click
PivotChart
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
49
Continuing is the same process as build a PivotTable report.
Calculated fields and item functions
It‟s possible to display in the table data that was calculated by a function and is not
included in the original database.
For example:
In our case, we are calculating the sum of Account Statements in NIS for different
branches. We can display this summing in US$.
1. Put the cursor inside the Pivot table.
2. Click on the Fields,items,&sets button in the Options bar
Calculated field…
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
51
3. The following window will open
4. In the “Name” text box, enter the header name for the new field for the table.
5. In the “Formula” text box, enter the formula you wish to calculate by using the
fields listed in the “Fields” windows.
It‟s impossible to use references for cells or cell‟s fixed names.
Attention: Formulas for calculated fields are performing on category summarizing ,
unlike the item functions that perform on sole items.
9.3 Design tab
Using design tab (PivotTable tool) - you can choose a variety of styles and layouts to design the PivotTable report.
9.4 Displaying the summarized details
Each summing in the table can be detailed, and display all it‟s components.
1. Double click on one of the summed data fields:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
51
2. The details would be displayed in a new sheet:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
56
10 The Excel Program Adjustments
This chapter will describe the different options possible to adjust the program to the
use of each user.
It is possible to control the display of the sheet, windows, calculation methods, data
editing, number of sheets in a workbook and more.
The adjustment is possible by clicking on the File Button Options…
10.1 Customize Quick Access Toolbar
The Quick Access Toolbar is a customizable toolbar that contains a set of
commands that are independent of the tab that is currently displayed. You can
move the Quick Access Toolbar from one of the two possible locations, and
you can add buttons that represent commands to the Quick Access Toolbar.
The Quick Access Toolbar can be located in one of two places:
The default location is upper-left corner next to the File Button
Below the Ribbon. To switch the place click on near to the toolbar and
select
Add a command to the Quick Access Toolbar
You can add a command to the Quick Access Toolbar directly from commands that are displayed on the Office Fluent Ribbon.
1. On the Ribbon, click the appropriate tab or group to display the command that you want to add to the Quick Access Toolbar.
2. Right-click the command, and then click Add to Quick Access Toolbar on the shortcut menu.
To add any command from the excel program:
1. click on near to the toolbar and select from the list
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
53
Choose commands from, choose the category of the command you want to
add from ( tab, menu, not in the ribbons ex') Select the chosen command
Click on The command will added to the right side(all the commands in the quick
access toolbar are shown in the right side) if you want to remove commands choose Remove
Click OK
10.2 Default directory for Excel files
.Automatic loading of files while Excel start
It is possible to decide that when starting Excel, specific workbook would open
automatically. While loading the program, Excel is checking directory XLSTART to
look for files. If this directory is empty, a new workbook would open.
If you would like to open a workbook when Excel start, save the file in that directory.
Search for a directory named XLSTART and copy the file into it.
It is possible to create a template for your needs to be automatically open:
Create a new workbook, design it as you wish and save it as BOOK.XLT in the
XLSTART directory.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
54
10.3 Different definitions in Excel
Click on File Button Options
The "Excel Options" dialog appears, allowing you to configure the following groups of options by clicking on categories in the left pane:
General – Allows to change the most popular options in Excel
Formulas- Allows to change options related to formula alculation,
performance and error handling sheet and
Proofing- Allows to change how Excel corrects and format your text
Save – Allows to customize how workbook are saved
Language – language options for editing the software
Advanced- Advanced Settings on various topics - Edit, print, view, etc.
Customize Ribbon -Ribbon customization option (create a new personal
tabs or edit the original ribbons)
Customize -Customize the Quick Access Toolbar (add / remove
commands).
Add-Ins- View and mange Microsoft Office add-ins
Trust Center- Security settings in Excel (macro, external additions, etc.)
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
55
10.4 Formulas with loop calculations
Sometimes, a formula is performing a calculation on the cell it‟s written in. This
creates a loop calculation (cyclic reference).
It‟s possible to do so, by defining how much iteration will be made or until a specific
condition is met.
For example:
In cell D35 there is a formula calculating the total of sales up to date. This is a cyclic
calculation summing it self. In order to use this kind of formula, we have to define the
iterations number to 1.
Each time, the formula will calculate the cycle only once, adding the number in cell
D34 with itself. Each change in cell D34 will refresh the result in cell D35.
In order to define the number of iterations:
1. Click on File Button Options Formulas Calculation options :
2. Change Maximum Iterations to 1.
3. In order to define the maximum change between the 2 calculated results,
enter a value in the textbox. The smaller the number, the accurate the result
will be and the calculation time will be longer.
11 Cooperative workbooks
Sometimes you would like to share your workbook with other users in your company,
especially when using an intranet network.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
56
The problem is that you expose your data and designing to other users to change.
Excel allows you to decide what can be changed in your workbook and how much
you would like to share.
11.1 Password based sharing
It is possible to determine a password to be used when loading an Excel file. Using a
password, only authorized people will be able to edit and open your files.
1. Click on File Button Save As…
2. Click on the button. And choose General options…:
1. Password to open – Opening this file only by entering this password.
Password to modify – Editing this file only by entering this password.
Attention: This password distinguishes capital letters.
Make sure you save your password! It‟s impossible to open a file without the
password given!
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
57
2. Read only recommended – If marked, the user will get a dialog box and will
have to decide whether to open the file as a read only.
Yes – The file will be opened as a read only
No – The file will be opened with edit options
11.2 Removing a password
You have to know the password prior to it‟s removal.
1. Open the workbook using the password.
2. Click on File Button Save As…
3. Click on Tools and choose General options…
4. Delete the password.
5. Save the file again.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
58
11.3 Shared databases
For users working on a local network, the program allows to share a database for the
use of several users at a time. It allows reading and editing the data but not the
design. In order to share a database, the file has to be saved on a shared directory.
In a shared workbook, there are several limitations and some of the program‟s option
will not be available. For example, it‟s impossible to delete sheets, creating a Pivot
table and more.
1. Click on Tab ReviewShare Workbook
2. The Share Workbook dialog box will open
3. Mark “Allow changes by more than one user…”
The program lists all users working at the file. The user name is taken from the name
enter while installing the program. In order to change a user name: Click on File
OptionsGeneral
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
59
4. Go to the Advance page to determine the sharing conditions:
5. Click on the to finish
After sharing the file, there will be a [Shared] sign in the header of the Excel window,
next to the file name.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
61
11.4 Conflicted data alert
When sharing a file, all the changes made by all users will be saved. Sometimes,
those changes are conflicting and you (as the user that shared the file) would have to
decide which one of the changes to save.
All the conflicted cells would be highlighted in the sheet. It‟s possible to create
another sheet in the workbook, in order to save the history of all conflicts. For the
user‟s request, the program would add a new sheet, named History, at the end of the
sheets list, and there it will track all changes and chosen solutions. The program will
show the user all the changes made from the last time he opened the file.
1. In order to display the changes made:
a. Click on Tab ReviewShare Workbook
b. In the Advance page choose Track changes section select to Keep
change history for X days and decide the number of days to keep
the changes.
c. Click on .
2. If you would like to see the conflicts and history of changes:
a. Click on Tab Review Track ChangesHighlight changes
Highlight changes on screen – highlight the changes in the sheet.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
61
List changes on a new sheet – a new sheet will be added with a list of all changes
made in the workbook, user name that made the changes, date of change ex.
11.5 Accepting and rejecting changes
1. Click on Tab Review Track changesAccept or reject changes
2. Click on the button:
In this window, you will see the changes made and can if decide to accept or
reject them.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
66
11.6 Who is working on the database?
It‟s possible to display the list of users working on the database at the moment.
1. Click on Tab Review Share workbook…
2. In the Editing page you will see a list of all users editing the file at the
moment. You will see the date and time the file was opened at that user.
3. In order to delete a user of that list, Use the button.
After receiving the workbook back:
After another user sends you back the file after review, you will be asked if to update
the file, when you open it.
If you would decide to update it, all the changes made would be displayed and you
could review them using the Reviewing Toolbar that will be opened.
11.7 Protection of the sheets and workbook
It is possible to protect the window status inside the workbook so no changes like
size, location ex. would be available. It is also possible to prevent changes in the
workbook structure.
These are the actions that can be prevented:
Creating new chart sheets (it‟s possible to import a chart to an existing sheet)
Recording a new macro
Moving or copying a sheet in the workbook or from another workbook
Displaying the original data of a cell in Pivot tables
Using the scenario seeking option
Using add-ons
Protecting the workbook:
1. Click on Tab Review Protect workbookProtect Structure and
Windows
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
63
2. Choose what to protect (Structure and/or Windows)
3. Enter a password for the protection
4. Click on the button.
All control buttons of the window are hidden.
Releasing a workbook from protection mode:
Click again on Tab Review Protect workbook Protect Structure and
Windows (the will remove, if you have password click it)
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
64
11.8 Protecting a sheet in a workbook
It is possible to protect a singe or various sheets in a workbook.
Defining the protection:
1. Click on Tab Review Protect Sheet
2. Mark a V in Protect worksheet and contents…
3. Enter a password if needed.
4. In the list you would be able to decide which actions you would like to leave
unprotected. If a V is marked, it means that in spite of the sheet protection,
these actions are allowed.
5. Click on the button.
In order to lock/unlock a cell:
1. Mark the cell/array and Click on tab Home Format
2. In the menu that opens, click on the icon the protection of those cells will
be deleting. (if the background of the icon is orange the cells are looked)
Removing the protection:
Click on Tab Review Unprotect Sheet
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
65
11.9 Releasing cells in the sheet from the sheet protection
Once we choose to protect a sheet, all the cells in that sheet will be locked from
changes automatically. Sometimes we would like to lock only parts of the sheet while
other parts are open for changes.
In order to allow changes to parts of the sheet, we need to define what to lock:
1. Click on Tab Review group Changes Allow users to edit Range
2. After clicking on the New… button, a new windows will be opened:
Title – Enter a header for the array
Refer to cells – Mark the array you wish to leave unprotected
Password – It's possible to decide on a password so only the users that
will enter that password will be able to edit those cells.
3. Click on the Button and you will be returned to the
previous window:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
66
At this time, the array you have marked will be displayed in the window.
It's possible to change it‟s preferences by marking it and clicking on the
Edit… button or delete it by clicking on the Delete button.
Moreover, in this window you will see the Protect Sheet… button. This
button will allow you to open the sheet protection windows.
The option to edit selected cells is not relevant if the sheet is not
protected.
After protecting the sheet, if a user will try to edit a cell that is not included
in the editable list, the following error will appear:
Once the user will try to edit a cell that is included in the list, it will be
possible, unless a password was defined.
After entering the right password, the user will be able to edit the cell.
11.10 Release a graphic object from the sheet protection
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
67
It is possible to define that some of the graphic object will be unprotected in side a
protected sheet.
Step one (Releasing the object from the protection):
1. Choose the relevant object.
2. Click on Picture Tool Format group Size
3. Open the size dialog box
4. In the Protection page, cancel the mark in the Locked box.
5. Click on the button.
Attention! If the object is a diagram, it is necessary to unprotect each part of the
diagram.
Step two (Protecting the sheet):
1. Click on Review Tab Protect Sheet
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
68
11.11 Concealing Formulas
Sometimes you would want to conceal a formula from other users.
Step one (Marking and concealing the relevant cells):
1. Mark the array you wish to conceal.
2. Click on tab Home Format Format Cells
3. In the Protection page, Mark the Hide box
4. Click on the button.
Step two (Protecting the sheet):
1. Click on Tab Review Protect Sheet
11.12 Concealing sheets and workbooks
Concealing Sheets and workbooks can be helpful when using them as an aid for
other sheets and formulas and we would want the data to be concealed and
protected.
Concealing a workbook
Click on tab View Hide
Concealing a workbook automatically once opened
1. Conceal the workbook by selecting View tab Hide
2. Close the program using menu File Exit
3. A windows warning about changes in the workbook will appear:
4. Click on the YES button.
5. The next time this workbook will be opened, it will be hidden.
Displaying a hidden workbook
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
69
Click on tab View Unhide
A dialog box listing all the hidden workbooks will be displayed.
Hiding a sheet
Hiding a sheet in a workbook:
1. Click on tab Home on group cells Format 2. Choose from the menu Hide&UnhideHide Sheet
To unhide the sheet choose Unhide.
Attention! It's impossible to hide the last sheet in the workbook.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
71
12 Formulas – linking and advanced actions
It‟s possible to link formulas in a dynamic method between two workbooks, in order to
automatically change a data once the based cell in the other workbook, is changed.
There are 3 relevant definitions:
1. Exterior reference – referring to a cell or array located in a different
workbook.
2. Dependant reference – a workbook including a link to a different workbook in
order to depend in the data in the other workbook.
3. Origin workbook – The workbook including the data referred in the
dependant reference book.
12.1 How the link is displayed
In general, it‟s possible to find the next parameters in a linked cell located in a
dependant reference:
= ' c:\excel\examples\[eyal.xls]Sheet1' !$f$10
When the source workbook is closed, the full link referring to the source
workbook, in the formula tab: ' c:\excel\examples\[eyal.xls]Sheet1'
!$f$10 .
The workbook and sheet names are entered in an apostrophe.
The workbook name is entered in brackets.
An exclamation mark is separating between the general details for
locating the workbook and the cell reference inside that sheet.
$F$10 is the reference of the linked cell inside that sheet.
When the source workbook is loaded, the path will not be displayed, for
example: ' [eyal.xls]Sheet1' !$f$10.
In cases that the source workbook is located in the same path as the linked
workbook, there is no need to enter the full path.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
71
Instead of entering a long path name, it's possible to use the mouse.
1. make sure that the source workbook and the linked workbook are both open.
2. Create the formula in the linked workbook. Once you would like to use a data from
the source book, choose menu Windows and browse to the source workbook.
Now, each cell you would mark will be considered as a value in the formula
written in the linked sheet.
3. Click on ENTER when finished or go back to the linked workbook.
Use the tab View Arrange All to arrange the workbooks horizontal.
Example of workbooks linkage:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
76
12.2 Saving and opening linked workbooks
In general, always save the source workbooks before saving the linked workbooks.
This will assure you that all the formulas in the source workbook have been
calculated and all the references are legal.
When opening a linked workbook, while the source workbooks are closed, we will
see the next alert:
Once clicking on the UPDATE button, the program will use the updated data in the
source workbook and will display updated data in the linked cells and formulas.
Once clicking on the Don't Update button, the program will not update the linking
formulas. The user must be aware that the presented values are not necessary the
updated values. Meaning, if there will be a change of data in the source workbook
after saving the linked workbook; it will not be shown in the linking formulas.
It‟s possible to decide if the program will display an update massage when opening a
linked workbook. In order to do so, Click on (while working on the linked workbook)
Data tab Edit Links
The following window will appear:
Click on the Startup Prompt… button.
A dialog box will appear with 3 options:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
73
Option 1 – When opening a linked workbook, a dialog box would be displayed in
order to choose whether to update the links.
Option 2 – When opening a linked workbook, NO dialog box would be opened and
NO update would be performed.
Option 3 – When opening a linked workbook, NO dialog box would be opened but all
the links would be AUTOMATICALLY UPDATED.
12.3 Updating links between workbooks
Although Excel saves all links, sometime disconnections are possible from different
reasons like: Renaming the origin file name while a linked workbook is closed,
changing directories of files ex.
It is possible to reconnect links manually.
In cases we need to reconnect or updating links from different reasons:
1. Make sure you are editing a linked workbook.
2. Click on Edit Links…
3. In the dialog box all the current links will be displayed.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
74
Actions included in the dialog box:
Update the chosen links.
In order to mark more than one link, use the Ctrl key. In
order to choose all links, use Ctrl+A
-
Update the path of the source workbook, if
changed. When clicking on that button, an explorer
window would open to find and mark the new path
of the file. In order to check the path, click on
button Check Status to check the link.
-
Enable us to open and display the source file. -
Disconnecting the link between the workbook to the source
workbook and planting the current value from the source
file. After clicking on that button, an information box would
be opened to alert us that the link is being cancelled and
the current value in the source file will be planted at the
value in the linked workbook instead of the link. After
clicking on "Cancel Links", the disconnecting will be
processed.
Attention: It is impossible to Undo this action.
-
Check links status. The status will show us if the source
file is open, if the links are performing fine and est.
-
In cases we are linked to other Excel workbooks, the
manual option will not be available and under the Update
header, we will see the letter A below the Update header.
If the link is connected to an object from another program,
we could choose between an automatic or manual update
of the link. When manual update is chosen, an M letter
would appear below the Update header.
-
It‟s possible to disconnect a link and "plant" the current value from the source
workbook in a short way:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
75
1. Make sure that the source workbook is open.
2. Mark the link in the formula (in the linked workbook) and click on F9
3. The link would become a value and the link would be disconnected.
12.4 Saving a workbook with connections to a very large source file
In case you save a workbook containing links to a very large (in size) source file:
1. Click on File options
2. Display the page in group
3. Cancel the check-mark in the Save external link values option.
4. Using this option, we would prevent the program to save a copy of the values
contained in the source file, and save valuable disk space and work time.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
76
13 Scenario Manager
Sometime, calculating in Excel can return several scenarios for a given situation.
For example: Sales prediction for the next quarter. It‟s possible to create an optimistic
prediction, pessimistic or a mingled one.
By using the scenario manager, it‟s possible to check what the results might be in the
different options and then to analyze the data in a more efficient way.
13.1 Creating a scenario
Scenarios are performed by changing certain values in some of the cells.
Changing Cells – The cells that might be change in time and the user would like to
know how different values in those cells will effect on the final result. In most cases
those cells are including values and not formulas. It‟s possible to define up to 32
changing cells for each scenario.
To Create a scenario
1. Enter, in the changing cells, values that reflect the desired scenario.
2. Mark the changing cells.
3. Click on Data tab What If Analysis scenario manger...
4. Click on Add...
5. Enter a name for the scenario.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
77
6. Mark the cells you would like to change
7. Click on OK
8. The changing cells values would appear as defined:
9. It is possible to change the values in those cells.
In order to add another scenario, click on the Add button to open a new
scenario.
10. The finish, click on the button.
Attention! It is recommended to create a scenario of the source data before any
new scenarios, in order to be able to return to the source values.
13.2 Editing scenarios
In order to edit the scenario's data without redefining it:
1. Click on tab Data What If Analysis scenario manger... Choose the
scenario you wish to edit.
2. Click on the Edit… button.
3. Edit the values you wish to change.
4. Click on the button.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
78
13.3 Displaying scenarios
Watch scenario using the scenario box To work effectively with Scenario Manager you should use Scenario box.
To add Scenario box to the Quick Access Toolbar:
1. Click on near to the toolbar and select from the list
2. Choose
3. Add the command
4. Click OK
Choose the scenario from the scenario list box in the toolbar.
The changing cells would be updated and the scenario would appear.
Displaying scenario using the scenario manager:
1. Click on tab Data What If Analysis scenario manger
2. Choose the scenario and click on the Show button.
13.4 Deleting scenarios
It‟s possible to delete a scenario only using the scenarios manager:
1. Click on tab Data What If Analysis scenario manger
2. Choose the scenario you wish to delete
3. Click on the Delete button
4. Click on OK
Attention! It is impossible to undo deleting of a scenario.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
79
13.5 Protecting a scenario
There are 2 ways to protect a scenario: 1) Hiding a scenario 2) Protecting the
scenario from editing.
There are 2 steps to protect a scenario:
Step one: Choosing the type of protection.
Step two: Activation of the protection.
Only after the second step, the activation of the protection, the scenario would be
protected.
Step one: Choosing the protection type
1. Open dialog box Scenario Edit:
2. Check-mark the protection type.
a. Prevent Changes – No changed will be made in the protected
scenario. Change will be possible in "standard" cells in the sheet.
b. Hide – The scenario will not be listed in the scenarios list and other
users will not know about the existence of this scenario.
3. Click on OK
Step two: Activate the protection
1. Click on Tab Review Protect workbook.
2. Click on OK
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
81
13.6 Merging scenarios
Merging scenarios allow us to observe different scenarios made by different users
and learn how they anticipate the situation.
It is important to keep on compatibility of the changing cells in the sheets/workbooks
containing the merging scenarios with the sheet we import the scenarios to, meaning
the current sheet.
1. Open the workbook containing the scenarios to be merged.
2. Click on tab Data What If Analysis scenario manger
3. Click on the Merge button:
4. Choose the workbook and sheet to import from.
5. Click on the OK button.
Problems that might happen when merging scenarios
There are cases that more than one scenario is called in the same name. In this
case, when we merge scenarios, we could create conflicts:
1. If you have merged 2 scenarios in the same name of the merged, the
program will add the date for the merged scenario. For example: "Optimal 23-
02-03"
2. If 2 scenarios have the same name and the same date, the program will add
a number to the scenario's name. For example: "Optimal 23-02-03 2"
3. If we have merged 2 scenarios with the same name, the program will add the
creator user name to the scenarios name. For example: "Optimal 23-02-03
David"
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
81
4. If the 2 scenarios are also by the same user, the program will add a number
as mentioned. Example: "Optimal 23-02-03 David 2"
13.7 Scenarios summary report
It's possible to create summary reports for the different scenarios.
Those reports will show the entire scenarios, meaning, the changing cells values for
each and every scenario and the result cells.
Result cells – Cells including formulas that are reflected in direct or in-direct ways
from the changing cells.
The user will choose the result cells that represent data needed by him. For example:
total profit, total ROI ex.
The reports would be created in different sheets.
There are 2 report types:
1. Scenario Summary
The report displays all the scenarios in an easy to understand way.
The result cells would also be able to compare.
The report is auto-formatted
If we would like to present headers for cells instead of the reference, we
have to define names for those cells (each cell a different name), both
to changing cells and to result cells. In the example above, all the
headers for the result cells where defined before creating that report.
2. A Pivot table report of a scenario
It is very useful when several users present several scenarios, meaning, if a
scenario merge have been done and in the current workbook there are scenarios
created by different users.
It is possible to display each one of the scenarios using the page area.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
86
Creating summary report:
1. Open the Scenario manger
2. Click on Summary… (this button will be hidden if there are not scenarios
defined)
3. Choose the report type
4. In the Result cells box, mark cells that include formulas you wish to present
in the report.
While in the summary report, entering the result cells is optional, in the Pivot table
report it is necessary to enter the result cells.
5. Click on the OK button.
6. The reports would be displayed in different sheets.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
83
14 WHAT - IF
We use the WHAT-IF questions for:
1. Goal-Seek – searching for a value that will solve a formula.
2. Table – Using a table of data to predict numbers.
14.1 Goal-Seek
There are times that we know what solution we are looking for but we do not know
the value of the variable that will solve the formula with the needed result.
The Goal Seek function is fitting a variable value in order to receive a wanted result
in another cell.
For Example: We are seeking an apartment. We have a limited amount of 20'000
NIS to invest in rent. We would like to calculate the monthly rent we can afford,
considering the $ rate and the length of rent.
In this table we have all the relevant parameters.
Total expenses are a formula containing from: Rent * Rate * Number of payments
In our example we would like the value in cell B6 will be 20'000 by changing the
values in cell B3. Cell B3 is one of the parameters in the formula that is being
calculated in cell B6.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
84
In order to use Goal Seek:
1. Put the cursor in the cell that contains the formula (B6 in our example).
2. Click on tab DataWhat-If AnalysisGoal Seek…
3. In the Set Cell, Enter the reference of the cell that contains the formula (the
one that the cursor is in) and the user want to have a different result.
4. In the To Value cell, enter the value to wish to get by the formula.
5. In the By Changing Cell enter the cell reference contains the variant that the
formula will be changed upon, in order to get the needed result.
In cell B3 we will have the value that will get us the result.
In our example, we can look for an apartment with monthly rent of 370.4$ when
we have 20'000 NIS.
As long as we don‟t click on OK, we can undo the value and return to the last value.
If we want to stop the calculation while it is running, we can stop it by clicking on the
Stop button, in order to continue the calculation step by step, click on the
Step button .
It's possible to return to the previous result by clicking on the Cancel Button.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
85
Another example:
You have opened a new savings account and put in an initial amount. Now you
would like to calculate how much to deposit each month in order to reach to an
amount of 50'000 NIS.
In this table, all the variables are included.
Annual Investment was calculated by the FV function – this function calculated the
future value of an investment, based on periodic investments and a fixed interest
rate.
In our example we would want the value in cell A8 to be 50'000 by changing the
value in cell A6.
Since cell A6 is one of the variants in the formula of cell A8, we would like to reach a
result by changing one of it‟s variants.
In order to reach a solution using Goal Seek:
1. Put the cursor in the cell containing the formula to be calculated. In our
example the cell is A8.
Click on Data tab What-If AnalysisGoal Seek…
2. Set Cell: The reference of the cell including the formula.
3. To Value: the value we would like to obtain as the formula result.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
86
4. By Changing Cell: Enter the reference of the changing cell. Meaning, the
variant to be changed in order to get the needed result.
In cell A6 we would see the value that will get us the needed result.
In our example, if we would like to get to a yearly investment of 50'000NIS, we have
to deposit a monthly deposit of ~2877 in the savings account, considering an interest
rate of 2%.
14.2 A table to predict numbers (sensitivity analysis table)
Sometimes, you wish to know the amount of monthly payment if the interest rate
would change. This predicting table will display the amount pf each payment in
different interest rates.
10.2.1 One dimensional predicting table
In one dimensional table, we will check how different values of a variable reflect on a
specific formula.
1. Create the prediction array
a. In blank cells of the sheet, enter different values for the variable (in our
example we would enter different interest rates). Enter the values one
after the other in a row or column.
b. Copy/move the formula into the prediction array (as performed in the
following table:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
87
2. Mark the prediction table array
3. Click on Data tab What-If AnalysisData Table…
4. We have to indicate the cell with the original value of the changed variable.
Meaning, if we check how the monthly interest rate will effect on the monthly
payments, we have to indicate the cell including the original interest rate – B3.
Row cell – relevant only if the data from clause 1 is located in a row.
Column cell – relevant only if the data is located in a column.
5. Click on the button to see the result table:
It's possible to add more rows for the table, when each row contains a linked (direct
or indirect) formula to the cell we took the changing variable from.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
88
10.2.2 A two dimensional predicting table
In a two dimensional table we will check how different values of two variables in a
sheet reflect on a certain formula.
1. Create the predicting table
a. In empty cells in the sheet, enter in a column different values for a
variable parameters (in our example – different interest rates) and in a
row different variable values for the second parameter (in our example –
different number of payments)
b. Move/copy the formula you wish to check to the table array, at the
intersection of the row and column (as in the following example :)
2. Mark the prediction table array
3. Click on Data tab What-If Analysis Table…
Row cell – point the origin cell of the data located in the row (the changing
parameter)
Column cell – point the origin cell of the data located in the column
4. Click on the button to see the result (in the next page):
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
89
14.3 Expedition of calculation
Calculating data tables that are reflected by changing cells is longer than standard
formulas since every time a cell changes, all the formulas has to be recalculated.
It's possible to control the way the sheet calculates linked formulas:
1. Click on File Options…
2. In the page, choose option:
3. From now on, each time you wish to calculate the table, click on the F9 button
in the keyboard.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
91
15 SOLVER
The solver is used to find an optimal value in a certain cell by changing values in
several cell in that sheet.
Since the Solver saves the definitions in the dialog box in order to use it later on, we
need to define only one problem per sheet. For each sheet in the workbook, where
a problem has defined, the definitions to solve the problem will be saved.
The Solver can solve both linear and not linear questions.
The Solver is an add-on for the program and can be loaded in Data Tab :
If the Solver option is not listed in the Tools menu, Click on FileOptionsAdd-Ins
Go… and check-mark the Solver Add-in option.
If you can't find this option on that list, use the original program CD to install it.
15.1 Terms
Target Cell
The cell in the sheet we would like to find the optimal value.
The Target cell needs to contain a linked (direct or indirect) formula to the changing
cells. If it doesn‟t contain a formula, it has to be a part of the changing cells.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
91
The target cell can be a reference or a name. If we are not seeking for a maximum or
minimum, enter the wanted value into the text box.
Changing cells
The cells that reflect on the value in the target cell. The Solver changes these cells
until finding a solution.
It‟s possible to define up to 200 changing cells.
Attention: If the changing cells include formulas, the will be replaced by values if we
would want to save the Solver's result.
Enter the array names or references you wish to change into the textbox, in order to
get the needed result.
It‟s possible to let the program to guess which cells need to be included by clicking
on the button.
Limitations
It‟s possible to limit the values used in the Solver model, and the limitations can refer
to other cells that influence on the target cell.
To create a limit, click on the button in the Solver dialog box:
In this dialog box you can define the wanted limitation.
Click on the button to enter another limitation.
Clicking on the button, will return us to the main Solver dialog box.
It‟s possible to define 2 limitations for each cell (Upper limit and lower limit). The
limitation it self can be a formula, reference for a cell or a fixed value.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
96
15.2 Models
Saving a Model
After finding the solution, we can save the result as a Model and try to solve the
problem with different definition.
Click on the button and when a new dialog box will appear, click
on the :
The program saves the result and the cell array containing the data in the sheet. In
our example, the data will be saved in cells B12 to B17.
It's recommended to name the cell array containing the saved data for an easier
future use of the model.
Loading a Model
Loading a model is done by clicking on the button and entering a
name or a reference where the saved data cells are located in. (Cells B12 to B17 in
our example).
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
93
15.3 The Solver Reports
After the calculation, the following dialog box would appear:
It's possible to save the results or cancel them. In all cases we could ask for 3 kinds
of reports. The reports would be displayed in new sheets.
An Answer Report
A report including information regarding location, name, original value, original name,
final value of the target cell and the changing cells, and information regarding the
limitations.
* Not binding in the limitation status column indicates that the limitation has not been
met.
Sensitivity Report
A report containing information about how the result is sensitive to changes in the
formulas used to reach it. There are 2 kinds: Linear and not-Linear reports.
The linear report includes the next columns:
1. Cell – the changing cell reference
2. Name – A short textual information about the data in the cell
3. Final Value – The final value in the cell
4. Reduced Gradient – The change in the target cell for every change of one
unit in the changing cell
5. Largrange Multiplier – The change in the target cell for every change of one
unit in the limitations
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
94
Limits Report
Indicates the target cell and the changing cells, including their values, lower
limitations, upper limitations and the target value.
15.4 Different options in solving question with the Solver
When we use different units in the target cell, changing cells and limitations we need
to check-mark the Use Automatic Scaling in the dialog box displayed when clicking
on the button.
Options Search, Derivatives and Estimates contain different versions of
mathematical methods to solve problems. The default choice suits most of the
problems.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
95
16 Statistical analysis
Excel is equipped with a wide range of statistical tools.
Input array – The array of data have to be organized in a valid table format, in order
to be to perform analysis on it.
Output array – can be in the input array's sheet, in a new sheet or in a new
workbook.
If you will choose to paste the output values instead of the input array, you will not
be able to use the Undo button.
Each analysis tool has a dialog box including the option to mark the input and output
arrays, the format of the output data and the security level.
Choosing the analysis tools: Click on Data tabData Analysis
A dialog box will appear containing the analysis tools.
If the Data Analysis… option will not be listed in the Data tab, Click on
FileOptionsAdd-Ins Go… And check-mark option Analysis Tool Pack.
If this option is not listed in the add-in list, install it from the installation disks.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
96
17 Data exchanging with other programs
There are 2 kinds of data exchange:
1. Embedding – Inserting data like a chart, table, graphic object or text into a
sheet and this data becomes a part of that sheet.
2. Linking – Inserting data into a sheet as a link to the program holding the data.
Meaning, the data in the sheet will be updated each time the data is changed
in the source program. The sheet doesn‟t hold the data it self, but the path to
the source file (the link).
In order to be able to link data, the source program need to support OLE and DDE.
17.1 Assimilating Objects
1. Put the cursor in the cell that represents the upper-left corner of the pasted
object.
2. Click on Insert tabObject…
3. In the new dialog box, there is a list of programs allowing assimilation.
Choose the program you wish to insert an object from.
4. Click on the button and tat program will be loaded.
5. When finished to create the object in the chosen program, click outside the
source program and the object you have created will be displayed inside the
sheet.
Sometimes you would like to display an object as an Icon, so only when the user
will double-click on it, it will be fully displayed. In this case, you would have to put
a check-mark in the box Display as Icon.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
97
Attention: there are several objects that will always be displayed as Icons, like ASCII
files.
When you wish to insert a file that already exist in your computer:
1. In the Insert an Object window, go to page File Create From
2. Click on the Browse… button.
3. Choose the file you wish to paste.
17.2 Printing a pasted object
It's possible to control on the printing properties of a pasted object.
1. Mark the object
2. Click the mouse right click on the object.
3. Choose Format Object
4. Go to page Properties
5. If you don‟t want the object to appear in the printed page, cancel the check-
mark of the Print Object box.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
98
17.3 Edit an Object
Mostly, you can double-click on an object in order to edit it.
However, it's possible to reach the editing properties by marking the object and click
on Click on mouse right click ObjectEdit/Open
Open will open the object in a different window to edit it by the origin program.
(Sometimes choosing Edit will also open the origin program)
17.4 Inserting an image
It's possible to insert images of various formats by click on Insert Tabgroup
Illustrations You could choose an image from the clipart or choose an external
Picture from another directory in your computer
Excel can insert images from various types, with no need for an origin program.
17.5 Converting object to other formats
It's possible to convert an object so it's editing will open a different word processor.
Select the object, click on Click on mouse right click Object
Convert
Convert to: Convert the document format to the highlighted format in the text box.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
99
Activate As: The object will be loaded in the highlighted program in the text box, but
saving it will be as the original format of the object.
17.6 Object Linking
Object linking
1. It‟s possible to display an object in the Excel program while it is connected
to the origin program it was created in. Copy the data you wish to paste
as a link from the original program (Using a regular Copy action).
2. Locate the cursor in the upper left corner (when the sheet is from left to
right) of the area you wish to paste the linked data.
3. Click on Home tabPaste Paste Special…
4. Choose Paste Link and click on the button.
In order for the link to be valid, save the origin program before the Excel
sheet.
Editing the linked object
1. Double-click on the object
2. Select the object and then Click on mouse right click
ObjectEdit/Open
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
111
17.7 Controlling the links
The different links in each workbook are listed in a dialog box.
Click on Data tab Edit Links:
Updating a link
The linked object is updated each time the workbook is loaded or when the origin
object is being changed while the workbook is loaded already.
It's possible to control the update manually, by marking option Manual. In this way,
the object will be updated only when marked and after clicking on the
button.
17.8 Web queries
Some web pages are holding data that is ideal to analyze by Excel.
For example, it‟s possible to analyze stock rates in Excel by using data directing from
the web.
It‟s possible to retrieve refreshable data (building a sheet that will update its data
from the web) or to import data from the web and save it as static values.
Creating a new web query.
1. Click on Data tabgroup Get External DataFrom Web
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
111
2. In the new web query dialog, enter the web page address to import the data
from and click on GO.
3. Click on the next to the tables you wish to import OR click on the on
the upper-left corner of the page in order to import it fully.
4. Web queries are saved automatically with saving the workbook. If you wish to
save the query so it can be activated in other workbooks, Click on Save
Query and it will be saved as a text file with extension iqy.
5. In order to define import and format options, click on Options and check-mark
the desired options in the Web query options dialog box.
6. Click on Import
This is an example for a new web query:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
116
7. In the Import Data dialog box, choose to locate the imported data in
new or existing sheets.
8. After clicking on OK, a refresh icon would appear in the status bar,
in order to inform you that the query is activated. In order to check the
query status, double-click on the refresh icon.
An example for a web query:
To refresh and edit the data use in data tabgroup connections 1. status, double-click on the refresh icon.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
113
Refresh a query:
1. Mark a cell inside the query area
2. Click on Refresh All . A refresh icon would appear on the status bar
to indicate it's activated.
It‟s possible to use Copy/Paste in order to import data from a web page into the Excel
sheet. When pasting this data into the sheet, you can define the data as static or to
define them to be refreshed by clicking on the Paste options tag
and choosing refreshesable web query.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
114
18 An online or printed Form
The program allows every user to build an online form, to be filled directly into
the computer or a printable form to be printed and filled by hand.
An online form can be assembled by different fields.
Empty text boxes to be filled by the user or different command boxes to allow
the user to choose the data from a list.
It‟s possible to collect all the data from the forms, in one database.
Usually, one user creates a form to be filled by other users in the organization.
This is why the form must be easy to fill and to include all the needed
information and remarks.
The Excel program allows us to create forms, and to help people that don‟t
know how to work with Excel, to be able to enter data with no fear.
In order to create a form we will use the Form toolbar that displays a list of options
In order to display the form Controls click on Developer tab (if the tab is not shown –
show it by using File menu Options ) Control
group InsertForm Controls:
Some of the icons are for VB programmers use and will not be explained.
Each button we will add will be added as an object and we could perform all actions
we can perform on object (change size, location ex.).
Creating a command button:
1. In order to create a command button, click on the relevant icon .
2. The cursor will be changed to a + sign.
3. Draw the object by dragging the cursor in the wanted location in the
sheet.
For example:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
115
18.1 Command button types in the toolbar:
A text list:
- A list box.
Example:
- A combined box.
Example:
These two command buttons allows us to choose the option we want from an options
list and return the number of the choice in the list.
That means that if our list is: David, Noam, Carmit, and we choose Carmit – The
computer will return number 3 since Carmit is the 3rd on the list.
Defining the button:
After drawing the button in the sheet, it will be empty.
Since we would like to have a list of choices in that command button, we have to:
1. create a list of data somewhere in the sheet:
2. Click on the command button with the right mouse button and choose
Format Control…Control
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
116
In the Input range we would mark the list of data we have just created. These
values would appear in the list command button.
In the Cell Link we would indicate the cell we want the place the result from
that list.
After clicking on the button, we have to make sure that the
checkbox is marked. In order to be able to use the list button, we have to click
on any cell in the sheet and when we go back to the list box, we could choose
from the list.
Performing a function on the linked cell of the command button:
In this step we chose one of the options from that list and the computer returned a
number that indicates the number of the choice on that list. Now we would like to get
the text result.
In order to do that we need to perform an action that will find a text value according to
the number from the list.
We will put the cursor in the cell we want the result to be put in and use one of the
record locating functions or reference and lookup functions (VLOOKUP or INDEX).
Numbers range command buttons:
Scroll Bar- A rolling command
button.
Example:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
117
Spinner - A range command
button
Example:
These two buttons allows us to place a number from a list of numbers in a range we
predefine, into a specific cell.
Defining the command buttons:
Click with the right button of the mouse on the control button and click on Format
Control…Control
Minimal Value – The minimal value allowed in the box
Maximal Value – The maximal value allowed in the box
Incremental change – The distance between two values in the list
Page change – the change of values when clicking between the list arrows.
Cell Link – The cell that the result will be placed in
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
118
General command button:
Group box
A box that will allow us to group several
boxes and options, so we will know
which subject or question we refer to.
It's possible to change the group name
for any name instead of the default one.
Example:
- A text label
An option to add a description (a tag) for
any of the added objects.
Example:
A push button
A push button we could attach to a macro command.
Example:
A choice button:
Example:
A check mark
The check-mark allows us to choose more than one option for any questions.
Usually, all check-marks of the same subject will be grouped together.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
119
Control button options:
Click with the mouse right button on the control button and select Format
Control…Control
Unchecked – default will be unchecked
Checked – default will be checked
Mixed – default will be gray
Cell Link – Indicate the cell that you wish the result to be in:
True: if the control button is checked
False – if the control button if not checked
#N/A – if the control button is gray
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
111
In order to return our choice and not True/False/#N/A values, but as a text value, we
would use function IF (VLookup or Index are also useful), when the criteria will be
the result.
For example:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
111
Option Button:
Example:
Options Button
This button allows you to give the user a list of options to choose from. Only one
choice is possible. We must put all options for one question in one group and make
sure that all option buttons are INSIDE that group.
Button options:
Right click on the button, select Format Control…Control
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
116
Unchecked – default will be unchecked
Checked – default will be checked
Mixed – default will be gray
We will stand in the cell we are linking the result to and we would use the lookup
functions in order to find the text value (Index, VLookup ex.)
18.2 Data Validation
When we create a form for users, we would like to make this form as easy as
possible for the user. Data Validation will allow us to limit the user to a certain list of
values.
Click on Data tab, in the Data Tools group, click Data Validation .
Few examples for data validations:
1. Text length – Sometimes we would like to limit the length of text.
2. Value type – In a ZIP code field we would like to enter 5 digits only
It is also possible to display alerts for users to guide them with the right validation.
In the Validation menu, go to the Input Message page and enter the alert you wish
to display when entering a value to that cell..
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
113
Data validation allows us to display an alert window, if the user will enter wrong
values.
.
18.3 Protecting the form from changes
It‟s recommended that the form will be protected from unwanted changes by the
user. You should allow changes to be made only in the cells that are needed to be
changed by the user.
1. Click on Review tab Changes group Allow users to Edit ranges
and define the ranges to be changed
2. To protect the control button size, mark the relevant control, click on mouse
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
114
right click, Format ControlSizeLock aspect ratio.
3. Protect the sheet. Click on Review tab Changes group Protect sheet
4. Save the form.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
115
19 Macro
A macro is a list of commands we can perform in Excel.
Macros are automating actions for an easy use.
For example, if a user is used to design text in tables in a specific was: Big font,
bolded and in purple.
We can record a macro that will perform these actions and save working time.
The macro is programmed in Visual Basic for Applications (VBA).
The easiest way to program a macro is by using the Macro recorder.
19.1 Creating a Macro using the recorder
The macro recorder transforms the mouse movements and keyboard actions into
macro actions.
In the next example we would record a macro that will perform the following actions
on the marked cells:
1. Change the font to size 14
2. Bold the text
3. Change the text color to purple
It is recommended that you will perform the actions manually first, in order to know
them when recording the macro.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
116
15.1.1 Recording a macro
1) click on Developer tabCode group Record macro
2) Macro name – Enter a name for the macro. It is impossible to enter a space in
the macro's name. Use the _ instead.
3) Shortcut key – It's possible to define a short cut to play the macro.
4) Store macro in: (enter the macro's location)
a) Personal macro workbook – the macro will be always available in Excel
b) This workbook macro – the macro will be saved in this workbook only
c) A new macro workbook – the macro will be saved in a new workbook
5) Description – The user name and date of record. It‟s possible to enter a free
text.
6) Clicking on the OK button will start the recording.
To stop the recording:
In the status bar , click on the Stop button OR select Developer tab Code
group Stop recording
19.2 Changing links references
During the recording of the macro, the references of the recorded cells are fixed. In
order to change them to relative references, you can click (at any time) on the
Relative References button in the Developer tab.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
117
19.3 Executing a macro
There are 4 Ways to execute a macro:
1. A shortcut button – The shortcut you have defined before recording the
macro. In order to change or add a new shortcut for an existing macro:
Click on Developer tab Macro Mark the relevant macro and click on
Options…
2. Macros Menu - Click on Developer tab Macro
Select the macro and click on Run to execute it.
3. A button in the Quick Access Toolbar – Open the Customize the Quick
Access Toolbar dialog box, from more Commands
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
118
Go to choose Commands from and select Macros category.
Choose the macro and push Add button to the toolbar.
To change the icon and display a name for the macro button, push
Modify, and choose the icon for the selected macro.
4. A command button – A command button that is located inside the sheet
and once clicked, executing the macro. A command button would appear only
in sheets that you have inserted it, unlike all other options that will be
available in any other sheet and workbooks.
Click on Developer tabInsert and create a command button
somewhere in the sheet. A dialog box would appear to choose the assigned
macro for that command button. Choose the macro and click on OK.
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
119
Note: you cannot save a macro (as a simple .xlsx. attempting to do so would lead to the following:
in order to save the macro, you must save the workbook as an .xlsm
(Excel Macro-Enabled Workbook)
19.4 The macro module sheet/editing the macro
In the macro sheet, the textual description of the macro is displayed as the macro
recorder has translated it into a program. In order to edit the macro, or add any
manual commands:
Click on Developer tab Macro select the desired macro and click on Edit, the
Visual Basic Editor will open
Each macro includes: Lines starting with an apostrophe („) and text colored in green
that are describing a literal description as the macro‟s name, creator and date of
creation.
Opening line, starting with SUB command:
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
161
Closing line, starting with END SUB command:
All the lines that are between the opening and closing lines are the Macro‟s loops.
Regarding the code lines:
The VBA program knows how to act only if each command/formula is in a different
line.
For example:
A = B + 9 Legitimate
A = B Not Legitimate
+ 9
When we would like to divide a long command into 2 lines, in order to see it on the
screen, we could use the lower hyphen:
A = B _ + 5
© All rights reserved to John Bryce Hi-Tech College, a part of the MATRIX group
161
Programming Grammar:
When we would like to combine both values and text, or when we need to use two
text strings together in the same MsgBox, we can use the stringing operator (&):
sub VBA ( )
NiceName = " JOHNBRYCE TRAINING CENTER "
MsgBox " LEARNING IN " & NiceName
The text “JOHNBRYCE TRAINING CENTER” is defined to the NiceName variable. In
the MsgBox command line, there is a “LEARNING IN” string with the variable
NiceName. We are actually asking the program to add the value of NiceName after
the “LEARNING IN” text string.
Functions:
A function is a calculating code that returns a value.
Each function always starts with Function and ends with End Function.
Function Raise3 ( X )
Raise3 = x ^ 3
End Function
Pythagoras law: a2 + b2
= c2 :
Function Pitagoras ( a,b )
C = SQR ( a ^ 2 + b ^ 2 ) Pitagoras = c End Function