Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views46 pages

Course #1

The document provides an overview of Excel basics, including its applications in business, fundamental concepts like workbooks and cell references, and features such as formulas, functions, and graphs. It explains the different types of references (absolute, relative, mixed) and common error messages encountered in Excel. Additionally, it highlights the advantages of using Excel for data analysis and reporting in a corporate environment.

Uploaded by

delbezfarouk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views46 pages

Course #1

The document provides an overview of Excel basics, including its applications in business, fundamental concepts like workbooks and cell references, and features such as formulas, functions, and graphs. It explains the different types of references (absolute, relative, mixed) and common error messages encountered in Excel. Additionally, it highlights the advantages of using Excel for data analysis and reporting in a corporate environment.

Uploaded by

delbezfarouk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Informatique 4 (second year ESMT)

Course N°1 :
EXCEL Basics
I- INTRODUCTION
Excel is software from the Microsoft office suite that allows you to perform basic
and very advanced calculations. Integrated into many companies, the Excel
spreadsheet offers you the possibility of creating tables, automatic calculations,
graphs, databases (BDD), etc.

Regardless of the actual %, Excel is undeniably established in a large majority of


companies around the world.

Using Excel in companies:

 Budgets and financial forecasts (i.e. previsions)


 Reporting and consolidation. (i.e. data analysis)
 Financial analyses…

The advantages of using Excel in business:

Professionals’ familiarity with Excel (is not complicated)


Software flexibility and customization
Ability to link to external databases
Advanced automation capabilities….

II. Basic concepts:


Excel is an application designed to create and use tables, also called spreadsheets.

1-Presentation of Excel :

Page : 1 / 7
Informatique 4 (second year ESMT)

1
2

4 5

1  TITLE BAR

2  MENU BAR

3  TOOL BAR

4  NAME ZONE

5  FORMULA BAR

6  ACTIVE CELL RESULT

2. Workbook, worksheet, cell, cell range and active area:

A workbook is made up of spreadsheets, each with a tab. Clicking on a tab


displays the corresponding sheet. By default, the workbook has 3 worksheets. You
can add up to 255 sheets. Right-clicking on the tab allows you to add, rename or
delete a spreadsheet.

A spreadsheet includes:

Page : 2 / 7
Informatique 4 (second year ESMT)

• 16 384 columns, whose header boxes are named A to Z, then AA to AZ, then BA
to BZ, CA to CZ, and so on until XFD.

• 1 048 576 lines, whose header boxes are numbered from 1 to 1 048 576.

• The intersection between a column and a row forms a cell whose name is the
letter of the column followed by the number of the row exp: B2

(Note: we say “cell reference” instead of “cell name”)

• A rectangle constituting a set of cells is called a cell range (or matrix), the latter
is designated by the reference of the first cell, a colon then the reference of the last
cell exp: “B2:E8”:

Figure 2: cell range “B2:E9”

The active area is the smallest range of cells, starting with cell A1, and containing
all the data in the worksheet.

3. Content of a cell

• The content of a cell can be a number, text, date,… or a formula. For the content
to be interpreted as a formula, simply precede it with “=, + or -”. Exp:

TEXT FORMULA

Page : 3 / 7
Informatique 4 (second year ESMT)

Formatting the cell:

- “Number” group : In the “Number” group you can change the format of the
content in a cell: general, text, date, time, currency, etc.

- “Alignment” group: In the “Alignment” group you can:

• Choose the horizontal and vertical position of the text in the cell.

• Change the orientation of the text.

• Automatically wrap text.

• Fit text size to cell size.

• Merge a range of cells.

- “Font” group : In the “Font” group, you can:

• Select the font, style and size of the text.

• Choose the color of the characters as well as the background of the cell.

• Apply borders to cells. Applying a border to a cell includes the cell in the
active area.

4. Handling worksheets

Page : 4 / 7
Informatique 4 (second year ESMT)

In a workbook you can add or delete worksheets as well as rename or move


them; either by right-clicking on their tab or via the cells group in the home menu.

5. Conditional formatting
Conditional Formatting (or CF) is a tool for highlighting data, useful in all areas.
Excel has a number of predefined CF:

Example: We have the following table

JANUARY FEBRUARY MARCH APRIL MAY ….. DECEMBER


employee 01 15 000,00 DZD 18 015,00 DZD 18 625,00 DZD 74 256,00 DZD 25 561,00 DZD …….. 14 522,00 DZD
employee 02 25 215,00 DZD 14 256,00 DZD 25 862,00 DZD 88 253,00 DZD 65 428,00 DZD ……. 22 546,00 DZD
employee 03 25 825,00 DZD 14 626,00 DZD 25 865,00 DZD 45 823,00 DZD 25 514,00 DZD ……. 48 550,00 DZD
employee 04 17 582,00 DZD 15 482,00 DZD 65 855,00 DZD 15 822,00 DZD 18 455,00 DZD ……. 14 562,00 DZD
employee 05 15 254,00 DZD 18 269,00 DZD 18 879,00 DZD 74 510,00 DZD 25 815,00 DZD ……. 14 776,00 DZD
employee 06 25 469,00 DZD 14 510,00 DZD 26 116,00 DZD 88 507,00 DZD 65 682,00 DZD …… 22 800,00 DZD
employee 07 26 079,00 DZD 14 880,00 DZD 26 119,00 DZD 46 077,00 DZD 25 768,00 DZD ……. 48 804,00 DZD
employee 08 17 836,00 DZD 15 736,00 DZD 66 109,00 DZD 16 076,00 DZD 18 709,00 DZD ……. 14 816,00 DZD
employee 10 15 508,00 DZD 18 523,00 DZD 19 133,00 DZD 74 764,00 DZD 26 069,00 DZD ……. 15 030,00 DZD
employee 11 25 723,00 DZD 14 764,00 DZD 26 370,00 DZD 88 761,00 DZD 65 936,00 DZD ……. 23 054,00 DZD
employee 12 26 333,00 DZD 15 134,00 DZD 26 373,00 DZD 46 331,00 DZD 26 022,00 DZD ……. 49 058,00 DZD
employee 13 18 090,00 DZD 15 990,00 DZD 66 363,00 DZD 16 330,00 DZD 18 963,00 DZD ……. 15 070,00 DZD
employee 14 15 762,00 DZD 18 777,00 DZD 19 387,00 DZD 75 018,00 DZD 26 323,00 DZD ……. 15 284,00 DZD

Page : 5 / 7
Informatique 4 (second year ESMT)

Applications :

1- Display in red the amounts between 16 000.00 DZD and 19 000.00 DZD.

2- Display the 10% highest amounts in blue.

3- Display in green the amounts that contain the number 26.

4-Display the amounts for the month of April in the form of a blue bar

It is also possible to create a personalized CF according to a large number of


criteria by clicking on the New rule... button.

6. Concept of formula

Formulas are equations that perform calculations on the values contained in a


spreadsheet, they begin with the sign "=" and may contain some or all of the
following: functions, references, operators and constants. Exp: “= (B1+6) * B2 ^ 3”

B1 & B2 are references, “^” the exponent operator, 3 & 6 the numbers (constants).

Warning: you must pay attention to the priorities of mathematical operations.

For example: if B1 contains -5 and B2 contains 2 and we write in B3 the formula:


=(B1+6) * B2 ^ 3 excel will display 8 but if we don’t put the parentheses =B1+6 * B2
^ 3 excel will display 43.

7. Concept of function

The function is a pre-written formula that takes one or more values, performs an
operation, then returns one or more values, exp: SUM (nb1; nb2;…) this function
returns the sum of the values nb1, nb2,…, the latter can be numbers or references to
one or more cells.

Examples: As part of this first course we will only work with: SUM, AVERAGE,
MAX, MIN.
Page : 6 / 7
Informatique 4 (second year ESMT)

8. Concept of graph

Excel graphs allow the graphical representation of data, so the graph will be
automatically updated once the data is modified.

To insert a graph, simply choose a type in the “Graphics” group in the “Insert”
menu, at which point 3 tabs appear in the menu bar titled “Creation”, “Layout” and
“Formatting”. In “Creation” you can modify the type and style of the graph, in
addition you can choose and modify the data used in the graph. The “Layout” tools
allow you to modify the names and layouts of the axes and the labels (legend, axis
titles, graph title, etc.), as well as the graph name.

Example:

This table represents the weekly temperature morning, evening and night. A
graphical representation better shows the temperature variation, for this we have
inserted a 3D line type graph, the days on the horizontal axis, and the temperature
on the vertical axis.

Page : 7 / 7
Informatique4 SECOND YEAR ESMT

Course 2: Basic concept (continued)


Part 01: Absolute, relative, symbolic and mixed references
A reference identifies a cell or range of cells in a worksheet and indicates the location
of values or data to use in a formula. exp: B2:F5. There are two modes of referencing:
1. Absolute reference:
In this mode of referencing; we precede the column letter and the line number in the
cell name with the “$” sign, exp: “$A$1”. At this time the number (column letter or row
number) will not change if we copy the formula into another cell.
2. Relative reference:
This is the default mode that Excel uses, the reference is represented directly by the
letter of its column and the number of its line, exp: “A1”.
In this mode if we copy the formula into another cell; the row or column number will
change depending on the location of this new cell relative to the one containing the
formula at the beginning.
Example: Application of the Total Price formula: Price_T = Price_U * Qt *(1+VAT).

So the formula used in cell “D2” is: «B2*C2*(1+$E$2)». Where “B2” and “C2”
successively represent “Price_U” and “Qt” of the second line, while “$E$2” represents
the “VAT” which remains unchanged.
Copying/pasting cell “D2” into “D5” automatically gives the formula: «(B5*C5)*(1+$E$2)».

Page : 1 / 4
Informatique4 SECOND YEAR ESMT

We notice that the line numbers in the relative references “B2” and “C2” are
incremented by “3” while their columns are not changed, and this is because “D5” is
on the same column as “D2” but in 3 lines after the latter.
3. Mixed reference
An A$1 or $A1 style reference tells Excel how to find another cell by combining
absolute and relative column or row references. They are indicated by placing the $
sign in front of the letter corresponding to the column or in front of the line number.
For example in the reference $A1, the column reference ($A) is absolute while the
row reference (1) is relative.

For a formula copied


If the reference is: It will go to:
from B1 to D3:
$A$1 (Absolute column and absolute row) $A$1 (absolute reference)

A$1 (Relative column and absolute row) C$1 (mixed reference)

$A1 (Absolute column and relative row) $A3 (mixed reference)


A1 (Relative column and relative row) C3 (relative reference)
Trick :
 By pressing the F4 key once you will obtain an absolute reference
 By pressing the F4 key twice you will obtain an absolute line (i.e mixed reference)
 By pressing the F4 key 3 times you will obtain an absolute column (i.e mixed reference)
4. Symbolic reference:
Formulas can be made much more understandable by giving them names. You
can define a name for a cell, a range of cells, a set of range of cells or a constant.

Steps to create a name for a cell or range of cells in a worksheet:


1. Select the non-adjacent cell, cell range, or selections you want to name.
2. Click the Name box at the left end of the formula bar.

3. Type the name you want to use to refer to your selection and press “Enter”.

Page : 2 / 4
Informatique4 SECOND YEAR ESMT

Part 02: Error messages


General information:
Errors in Excel formulas appear as a small green triangle in the upper left corner of
the cell, as well as an error name preceded by a pound symbol (#) :
If you select a cell containing an error, an exclamation point located in a yellow
diamond appears to the left of the cell concerned:
By clicking on this symbol, you obtain a drop-down list indicating the type of error as
well as help for its resolution.
In certain cases, you can decide to ignore the error.
Types of error messages:

Division by zero error:

• Entering a formula performing an explicit division by 0; for example =5/0


• Use, as a divisor, of a reference to an empty cell or to a cell containing 0 as a divisor.

NULL value error:

This error occurs when you specify an intersection of two areas that do not actually
intersect. The intersection operator is a space character between references.
Example =SUM(A1:A5 A6:A8). It will show the error #NULL! because the
intersection between the 2 ranges is the empty set.

Value error:

This error occurs when an inappropriate argument or operand type is used.


• You assigned a range of cells to an operator or function that requires a single value.
(For example: =SIN (A1:A5)
• The elements of the formula are not compatible (For example: =10+"list" ).

Invalid cell reference error

This error occurs when the coordinates of a cell are invalid.


• You deleted cells that other formulas referenced:
For example: if you write in cell B1 the formula =SUM(A1:A2) and then you completely
delete column A in this case Excel will replace the formula with =SUM(#REF!)

Page : 3 / 4
Informatique4 SECOND YEAR ESMT

Error due to invalid name

This error occurs when the application does not recognize the text of a formula.
• You used a cell or cell range name that does not exist.
• Text was entered in a formula without being enclosed in quotation marks: “ ”.
• A function has been misspelled :
for example if you write the formula in a cell: =Averg (A1:F6)
Number error

This error occurs if a formula or function contains invalid numeric values.


• A number is too large or too small to be represented in Excel. Values must be
between -1*10307 and 1*10307
• A function that executes but fails to find a result. for example: =FACT(-1)
Error displaying a numerical value
This error occurs when a column is not wide enough to display all of the numeric data.
Simply modify the width of the column to resolve the problem.
This error can also come from calculations on dates and times (negative results).

Page : 4 / 4
Informatique4
Second year ESMT
Course N°3
Sorting, filtering and search functions

Part 01: DATA SORTING


You can sort data based on text (A to Z or Z to A), numbers (smallest to largest or
largest to smallest), and dates and times (oldest to the most recent and from the most
recent to the oldest) in one or more columns. You can also sort by a custom list (for
example, Large, Medium, and Small) .
Most sort operations are column sorts, but you can also sort rows.
1-Sort text
1. Select a column that has alphanumeric data in a cell range, or make sure the active
cell is in a table column that contains alphanumeric data.
2. In the Editing group on the Home tab, click Sort & Filter.
3. Do one of the following:
 To sort in ascending alphanumeric order, click Sort A to Z.
 To sort in descending alphanumeric order, click Sort Z to A.
2- Sort numbers
1. Select a column that has numeric data in a cell range, or make sure the active cell is in a
table column that contains numeric data.
2. In the Editing group on the Home tab, click Sort & Filter, and do one of the following:
 To sort in ascending numeric order, click Sort Smallest to Largest.
 To sort in descending numeric order, click Sort Largest to Smallest.
3- Sort dates and times
1. Select a column that has dates or times in a cell range, or make sure the active cell is
in a table column that contains dates or times.
2. In the Editing group on the Home tab, click Sort & Filter, and then do one of the
following:
 To sort in ascending date or time order, click Sort Oldest to Newest.
 To sort in descending date or time order, click Sort Newest to Oldest.
- Page : 1 / 6
4- Sort rows
1. Select a row of data in a cell range or make sure the active cell is in a table row.
2. On the Home tab, in the Editing group, click Sort & Filter, and then click Custom Sort.
The Sorting dialog box appears.
3. Click Options.
4. In the Sort Options dialog box, under Orientation,
click Left to Right, and then click OK.
5. Under Row, in the Sort by box, select the row you want to sort.
Part 02: DATA FILTERING
When you insert your data into a table, and you click filter in Sort&filter, arrow
controls are added to the table headers automatically.

For quick filtering, follow these steps:

1. Click the arrow in the table header of the


column you want to filter.

2. In the list of text or numbers, uncheck the


(Select All) box at the top of the list, then check the
boxes for the items you want to display in your table.

- Page : 2 / 6
The filter arrow in the table header changes to the following icon : to indicate
that a filter is applied. Click on it to edit or remove the filter.

 Filter based on text or specific numbers:

1. Click the arrow in the table header of the column you want to filter.

2. If the column has numbers, click Number Filters. If the column contains texts,
click on Text Filters.

For example, to display numbers


above a certain amount, choose Greater
than or equal to, then enter a number in
the adjacent box.

Part 03 : Search functions

1. VLOOKUP (RECHERCHEV in French)


Searches for a value in the first column of a table and returns the value found on the
same row in a specified column of the table.
Syntax:
VLOOKUP (Search_Value; Data_Range; Column_Index; [Near_Value])

 Search_value: value that will be searched for in the first column of the Data_Range.
 Data_range: Search source range.
 Column_index: Number of the column which contains the wanted value.
 [Near_Value]: A logical value (TRUE or FALSE) that specifies whether you want
VLOOKUP to find an exact match or an approximate match (optional parameter).

Application :

- Page : 3 / 6
In this example the function returns the name of the customer with ID=46, i.e. Mohamedi

2. MATCH (EQUIV in French) :


The MATCH function finds the position of a value in a vector.
Syntax: . MATCH(search_value; search_array; type) .
“Search_value” enter the value you want to get the position.
“search_array” enter the range of cells in which the function will search for the
position of “Search_Value”.
“Type”
Value of “type” Value found Condition on search_array
0 exact value No condition
1 nearest lower value must be placed in ascending order
-1 nearest upper value must be placed in descending order
EXAMPLE :
The objective is to display the position of the best amount located in the sales column.
The best month is indicated in cell B17 using the MAX function: (B18=MAX(B2:B13)).

The formula will be (for cell B18): =MATCH(B17;B2:B13;0)

- Page : 4 / 6
The formula returns 6, which corresponds to the position of the best month in the
sales column (the number 99000,00 DZD is the sixth in the range B2:B13).

3. INDEX (INDEX in French) :


It returns the value of the cell located at the intersection of a given row and
column. If the reference consists of non-adjacent selections, you can choose which
selection to search for.
Syntax: . INDEX(reference; line_n°; col_n°; [zone_n°]) .
The reference form of the INDEX function contains the following arguments:
• reference [Required]: Represents a reference to one or more cell ranges.
(If you enter a non-adjacent range for the reference, enclose the reference in parentheses).

Note: If each reference box contains a single row or column, the row_num or
column_num argument, respectively, is optional. For example, for a single-line ref
argument, use the INDEX(ref;;col_no) function.

• line_n° [Required]: Represents the number of the reference line from which a reference
should be returned.

- Page : 5 / 6
• col_n°: Represents the reference column number from which a reference should be returned.

• zone_n° [Optional]. Selects a reference range from which to return the intersection of line_n°
and col_n°. The first zone selected or entered is numbered 1, the second is numbered 2, and so
on. If field_number is omitted, INDEX uses field 1. The fields listed here must all be on one sheet.
If you specify areas that are not on the same sheet, a #VALUE! Error will appear.

For example, if reference describes cells (A1:B4;D1:E4;G1:H4), zone n°1 corresponds to


the range A1:B4, zone n°2 corresponds to the range D1:E4, and zone n°3 to the range G1:H4.

Application :

- Page : 6 / 6
« Course N° 04 »
MATHEMATICAL FUNCTIONS
I- Reminder:

A function is made up of the equal sign (=), its name and the parameters, also called
arguments (they are not obligatory). These parameters can be of different types and the number
of parameters varies depending on the functions.
=FUNCTION_NAME (PARAMETER1; PARAMETER2;...)
II- Mathematical functions:
1. The SUM function
The values entered into this function will be added. It is used in the form: Sum (nbr1;
nbr2;…), the arguments are separated by « ; »
Application :
• Sum (3; 5)  3+5.
• Sum (A2:A4)  A2+A3+A4.
• Sum (A2; B3: E5; 15)  A2+B3+B4+B5+ C3+C4+C5+ D3+D4+D5+ E3+E4+E5+15.
• Sum (A2: E5 B4: E6; Z5)  Sum (B4: E5; Z5)  B4+B5+C4+C5+D4+D5+E4+E5+ Z5
2. The PRODUCT function
The PRODUCT function allows you to multiply several numbers or cells together.

NOTICED: The function SUMPRODUCT(array1,array2,array3, ...) Multiplies


corresponding components in the given arrays, and returns the sum of those products.

Page : 1 / 5
Informatique4 math functions

3. The QUOTIENT function

The QUOTIENT function returns the integer part of a division and is written as follows, and
takes 2 parameters: the divisor and the dividend.

=QUOTIENT(100;30)

4. The INT function


It allows you to display the entire part of a number.
It eliminates the fraction of the digit.

5. The ROUND function


It allows you to round a real number. It takes two parameters, the number to be rounded and
the number of decimals to display. It is written like this:
=ROUND(value; number_of_decimal)
For example: =ROUND (100.029384; 2)  result=100.03
Important: the decimal number is a positive, zero or negative integer.
Positive  after the comma
Negative or null  before the comma
• ROUNDDOWN Rounds a number tending towards 0 (zero).
• ROUNDUP Rounds a number up to the nearest integer, away from zero.

Page : 2 / 5
Informatique4 math functions

Examples:

6. The EXP function


The EXP function returns the exponential value of the argument.
Example :

7. The SQRT function


It allows you to calculate the square root of a number or a cell. It only takes one parameter, a
number or a cell. =SQRT (100) or = SQRT (E2)

8. The FACT function


Shows the factorial of a digit.
Useful when calculating probabilities.
Ex.: =FACT(3) = 6 (1 * 2 * 3)

9. The POWER function


This function returns the power and can be replaced by the symbol ^.
Ex : =power (x; sum(y;2))  = x^(y+2) (in math : x(y+2) )
10. The LOG function, LN and LOG10
LOG gives the logarithm of a number to a specific base
Ex. = LOG (81;9) the result will be: 2 (because 92=81)
The fct LN is equivalent to LOG in the base e= 2.71828183
The LOG10 fct is equivalent to LOG in base 10

Page : 3 / 5
Informatique4 math functions

11. The MOD function


It returns the remainder of a division and is written in the same way as the QUOTIENT
function.

12. The EVEN function


It displays the next even value if the value is not even.

13. The SUBTOTAL function.


Returns a subtotal in a list, its syntax is:
SUBTOTAL (function_num; ref1; ref2; ...)
• “num_function”: The number of the function used (see “table 1”).
• “ref1”, “ref2”, …: Represents references to cells or range of cells.
Includes hidden values Ignores hidden values Corresponding function
1 101 AVERAGE
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
6 106 PRODUCT
7 107 STDEV
8 108 STDDEVP
9 109 SUM
10 110 VAR
11 111 VARP
Table 1: The “num_function” numbers
Application :
Page : 4 / 5
Informatique4 math functions

In this example, row “3” and column “C” are hidden.


• A3 = 10 and C1 = 14.
• A7 = SUBTOTAL (9; A2: A6). (The value of “A3” is included in the calculation)
• E4 = SUBTOTAL (109; B1: E1). (The value of “C1” is included in the calculation)
• D7 = SUBTOTAL (109; A2:A3; A5; B1:D1). (The value of “A3” is ignored, however that of
“C1” is included in the calculation).
Note: Hidden values on a column will not be ignored regardless of the number used for
“function_num”.

TRADUCTION :
ENGLISH FRENCH
SUM SOMME
PRODUCT PRODUIT
QUOTIENT QUOTIENT
INT ENT
ROUND ARRONDI
ROUNDDOWN ARRONDI.INF
ROUNDUP ARRONDI.SUP
EXP EXP
SQRT RACINE
FACT FACT
POWER PUISSANCE
LOG LOG
LN LN
LOG10 LOG10
MOD MOD
EVEN PAIR
SUBTOTAL SOUSTOTAL

Page : 5 / 5
Course N° 5
Logical functions
Definition:

A logical function is a function that has at least one parameter that can be true or
false or that returns a result that can be true or false.

1. The IF Function:

Returns one value if a specified condition is true and another value if the latter is
false. This syntax is:

IF ( logical_test; value_if_true; value_if_false )

Example: if we want to write a formula which gives the absolute value of an integer
we write:

IF

• B2 = IF (A2>=0; A2; -A2)  if A2 is greater than or equal to 0 The absolute value


is A2 otherwise it will be - A2 .

Note: to calculate the absolute value you can use the ABS( ) function.

2. The nested IF Function: (if inside if)

We speak of a “nested IF” function if the arguments “value_if_true” and/or


“value_if_false” are replaced by an “IF” function, we can have up to 64 nestings in a
“nested IF” function.

Example: We have the following scenarios:

Informatique 4 Page : 1 / 6
• Score < 5  Mention: “Very weak”.

• 5≤ Score < 10  Mention: “Weak”.

• 10≤ Score < 15  Mention: “Good”.

• 15≤ Score < 18  Mention: “Very good”.

• Score > 18  Mention: “Excellent”.

B2=IF(A2<5;"Very weak "; IF(A2<10; "Weak"; IF(A2<15;"Good"; IF(A2<18;"Very good";"Excellent"))))

In this example we have three nestings of “SI”. The “value_if_false” argument is replaced
by an “IF” function in three nestings.

3. The IF( ) function combined with AND( ) and OR( ):

Combining the IF( ) function with AND( ) and OR( ) returns a value if a set of conditions is
met, and another value otherwise.

Application :

Combination of IF ( ) with AND( ):

The AND( ) function returns TRUE if all of these arguments are TRUE.

Informatique 4 Page : 2 / 6
• A student can only move to the next level if he or she has both averages (general and
Main) greater than or equal to “10”.

Method2 : =IF(A2 >=10; IF(B2>=10;"passed";"repetitive");"repetitive")

Combination of IF( ) with OR( ):

The OR( ) function returns TRUE if one of these arguments is TRUE.

• It is enough for one of the two numbers (X, Y) to be zero for their product to be zero.

Method2 : = IF (OR (A2 = 0; B2 = 0); “Null”; “Not Null”)

4. ISBLANK

The ISBLANK( ) function returns TRUE if the value argument is empty, FALSE if the value
argument is not empty.

The ISBLANK function follows the following syntax: =ISBLANK (argument1)

Example:

Informatique 4 Page : 3 / 6
5. ISTNUMBER

The ISNUMBER( ) function returns true if the value argument represents a number.

The ESTNUMBER function follows the following syntax: =ISNUMBER (argument1)

Example:

6. ISTEXT

The ISTEXT function returns TRUE if a value is considered text by Excel.

The ISTEXT function follows the following syntax: =ISTEXT(value)

Example:

Informatique 4 Page : 4 / 6
7. The COUNTIF function:

This formula allows you to count the number of non-empty cells corresponding to the
desired criterion.

Here is its syntax: = COUNTIF (Range ; Criterion)

Range: is the range of cells on which we will look for the number of cells corresponding
to the desired criterion.

Criterion: designates the choice made, number or


text.

Example: In the following table, we want to count


the number of “yes” answers.

In B10 we write the following formula:


=COUNTIF(B2:B8;"yes")

The result will be: 5

8. The SUMIF function:

This function allows you to add several cells according to a determined criterion. Its
syntax is: SUMIF (range; criterion; [sum_range])

Important: “range” and “sum_range” must have the same number of cells.

• range: The range of cells containing the criterion to retain.

• criterion: The criterion to be retained (number or text).

• [sum_range]: The range of cells where the numbers to be added are located.

Example:

Informatique 4 Page : 5 / 6
• E2 = SUMIF(B2:B7; ">24";C2:C7)

• E4 = SUMIF (B2:B7;"<=24";C2:C7)

• E7 = SUMIF (C2:C7; ">20000")

• E8= SUMIF (C2:C7; ">20000" ; C2:C7)

NOTE: if the sum is done in a matrix but the verification is done on several matrices we
must use the SUMIFS fct:

Its syntax is:

SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteria2…)

9. The AVERAGEIF function:

This function allows you to calculate the average of several cells according to a
determined criterion. Its syntax is: AVERAGEIF(range,criteria, [average_range])

Informatique 4 Page : 6 / 6
Second year
Module : Informatique4

Course N° 6
Text functions
A text function is a function that has an alphanumeric value as a parameter or that
returns an alphanumeric value or both at the same time.
In practice, these text functions are applied to codes (exp: bank code, vehicle number,
bar code of a merchandise, etc.)
Please note: an alphanumeric code does not necessarily contain letters, for example:
0014536
1- The CONCATENATE function
Allows you to assemble several character chains to form only one.
Syntax: =CONCATENATE (text1; text2; ...) but also =Ref_cellule&Ref_cellule& …
The & sign is then called a concatenation operator.
Important: when merging cell contents, you must always think about space. This
must then appear between quotation marks.
Application :
A B
1 Nom Prénom
2 Youcefi Mohammed
… …
The formulas for Concatenate:
Possible formulas To insert a space To insert a comma
= CONCATENATE(A2;B2) = CONCATENATE(A2;" ";B2) = CONCATENATE(A2;" , " ;B2)
= A2&B2 = A2&" "&B2 = A2&" , "&B2
YoucefiMohammed Youcefi Mohammed Youcefi , Mohammed

2. Left and Right functions:


Allows you to extract the first or last characters from a TEXT according to the length
indicated in the function.
Syntax:
=RIGHT(Text; number), =LEFT(Text; number)
• Text: is the text chain or the reference to a cell from which we want to extract the
last characters.
• Number: indicates the number of characters to extract.
Example:
=left("This is an example";4) = This
=right("This is an example";3) = ple
Page : 1 / 4
3. Upper and lower functions:
This formula allows you to convert the text in a cell to UPPER CASE or LOWER CASE.
syntax: =UPPER (Text) and =LOWER (Text)
Text: refers to a cell where some or all of the text appears in lowercase, and
converts it to uppercase and vice versa.
Example: In A1 you have the text "hello".
In B1 we write the following formula: =UPPER(A1).
The result is: HELLO
The same thing for the LOWER function.
4. The PROPER Function:
This formula allows you to capitalize the first letter of each word of text contained
in a cell and convert all others letters to lowercase.
Syntax: =PROPER(text)
text: refers to a cell where text appears all or part in lowercase, and converts it to
lowercase by adding an uppercase letter at the beginning of each word.
Example: In A1 you have the text “mohamed”.
In B1 we write the following formula: =PROPER(A1)
The result is: Mohamed

5. The Function MID:

Allows you to extract one or more characters from the middle of a text.
Syntax: MID (text; start_num; char_nbr)
•text: Represents the text containing the characters to extract.
•start_num: Represents the position in the text of the first character to extract.
•nbr_char: The number of characters to extract.
Example: Consider an array containing several character strings. Each character
string is built on an identical format. The goal is to extract the identifier indicated in
this character string. This information is located at the 31st character and consists of
four digits (Example for line 3: The identifier is 1587)
important: A space is considered a character.

code

Page : 2 / 4
6.The LEN function

LEN returns the number of characters in a TEXT. (length of a text)


Syntax: =LEN(text)
text: Represents the character chain whose number of characters we want to count.
Note: Spaces are considered characters.
Example: Consider a list of words.
The objective is to define the number of
letters in each word.

Preview : 

7. Text function
Converts a numeric value(number, date, time..) to text using a number format.
Syntax: =TEXT(value; text_format)
value: represents a numeric value, a
formula whose result is a numeric value, or
a reference to a cell containing a numeric
value.
text_format: is a numeric format in the
form of a text chain enclosed in quotation
marks.
Example : 

8. REPT function
The REPT( ) function is used to repeat text or the contents of a cell a certain number of times.

Syntax: =REPT(text;Nbtimes)
• text: represents the text to repeat.
• Nbtimes: is a positive number indicating the number of repetitions.
So, REPT("A";5) returns the result AAAAA, or if the content of cell C2 is the
character A, REPT(C2;3) returns AAA.

Example

Page : 3 / 4
In this example we have codes in column C that must be completed with zero (0) so
that the complete code is 9 characters long:

TRADUCTION :
ENGLISH FRENCH
CONCATENATE CONCATENER
Left GAUCHE
Right DROITE
Upper MAGISCULE
Lower MINISCULE
PROPER NOMPROPRE
MID STXT
LEN NBCAR
Text TEXTE
REPT REPT

Page : 4 / 4
Course N° 7
Date and time functions
The NOW ( ) function
The NOW function returns the date and time at the time of calculation, and indicated
by the PC's internal clock.
The syntax : =NOW( )
This function has no arguments. The current date and time are automatically
updated with each recalculation. The date and time are displayed in the custom format
DD/MM/YYYY HH:MM if the cell containing the formula is in standard format before
inserting the formula.
Example: the case of the time of an operation in a vending machine or the time of
manufacture of a food product…
The TODAY() function
This function allows you to automatically display the system (computer) date in a
cell. You can also use this function in combination with another calculation formula on
dates.
Here is its syntax: =TODAY( )
Please note: There is nothing to write between parentheses
Example: You have entered a due date in cell A1 (for example 12/04/2024). In B1 you
want to know the number of days remaining between this due date and today's date.
In B1 you write: =A1-TODAY( )
Assuming that today's date is March 14, 2023, the result is: 30 (if the cell format is
Standard)
(Attention: the result here can be negative, for example: if today's date is April 14,
2024, the result will be: -2)
The DAY() function
This function allows you to extract the number of the day of the month from a date
entered in a cell (or in the formula itself). The extracted number can thus be used to
perform calculations or tests as part of a logical function.
Here is its syntax: =DAY( )
Example: You have entered a payment date in cell A1 (for example 12/06/2004). In
B1 you want to know the day on which the invoice must be paid taking into account a
payment deadline of 8 days. In B1 you write: =DAY(A1)+8

- Page : 1 / 4
The result will be: 20
The MONTH() function
This function allows you to extract the month number from a date entered in a cell
(or in the formula itself). The extracted number can thus be used to perform
calculations or tests as part of a logical function.
Here is its syntax: =MONTH( )
Example: You have entered a payment date in cell A1 (for example 12/06/2004). In B1
you want to know the day on which the invoice must be paid taking into account a
payment deadline of 2 months. In B1 you write: =MONTH(A1)+2
The result will be: 8
The YEAR() function
This function allows you to extract the year number from a date entered in a cell (or
in the formula itself). The extracted number can thus be used to perform calculations
or tests as part of a logical function.
Here is its syntax: =YEAR( )
Example: You entered a date in cell A1 (for example 12/06/2004). In B1 you want to
add a year to this date. In B1 you write:
=YEAR(A1)+1
The result will be: 2005
The DATE() function
This function can be combined with the functions above. But it can also be used
alone. This function allows you to calculate one date from another. You can also use
this function in combination with another calculation formula on dates.
Here is its syntax: =DATE(year; month; day)
Example 1: You have entered a payment date in cell A1 (e.g. 12/06/2004). In B1 you
want to know the day on which the invoice must be paid taking into account a
payment deadline of 2 months. In B1 you write:
=DATE(YEAR(A1);MONTH(A1)+2;DAY(A1))
The result will be: 12/07/2004
Note: if the sum of the months exceeds 12, the year will be incremented automatically,
in this example if the period is 7 months the result will be 12/01/2005
Example 2: You need to automatically obtain the date of the last day of the accounting
exercise. You have entered the date of purchase of a product in cell A1 (for example
15/06/2004). In B1 you want to obtain the year-end date (namely December 31 of the
year). In B1 you write:
=DATE(YEAR(A1);12;31). The result is: 31/12/2004

- Page : 2 / 4
Question: write the formula that displays the semester end date for each product.
The DATEDIF function:
This function calculates the difference between two dates in years, months and days.
It has 3 arguments:
Syntax: =DATEDIF(Date1;Date2;code)
This function returns the difference between Date1 and Date2 (note, Date2>=Date1)
according to the Code argument, which can take the following values:
• “y”: difference in years (year)
• “m”: difference in months (month)
• “d”: difference in days (day)
• “ym”: difference in months, once the years are subtracted
• “yd”: difference in days, once years subtracted
• “md”: difference in days, once years and months are subtracted
The DATEDIF( ) function can be used in particular to calculate ages.
For example, if cell A1 contains a date of birth and cell A2 contains today's date:
Example: in A1: 20/04/1963 and in A2: 27/05/2002
Formula Result
Formula Result
=DATEDIF(A1;A2;"y") 39
=DATEDIF(A1;A2;"m") 469
=DATEDIF(A1;A2;"d") 14282
=DATEDIF(A1;A2;"ym") 1
=DATEDIF(A1;A2;"yd") 37
=DATEDIF(A1;A2;"md") 7

The WEEKDAY () function


This function allows you to know the number of the day of the week from a date
entered in a cell (or in the formula itself). The extracted number can thus be used to
perform calculations or tests as part of a logical function.
Here is its syntax: =WEEKDAY(Date; return_type)
Date: is the reference date (entry or reference to a cell)
return_type: is the code of the days:
• code 1: Sunday = 1 and Saturday = 7
• code 2: Monday = 1 and Sunday = 7
• code 3: Monday = 0 and Sunday = 6

- Page : 3 / 4
Example: You have entered a payment date in cell A1 (for example 06/09/2004). In B1
you want to know the corresponding day of the week. In B1 you write:
=WEEKDAY(A1;2)
The result is: 3
The HOUR function
The HOUR function extracts the time (an integer between 0 and 23) from a time
code (a fraction of 24 hours).

The syntax : =HOUR(serial_number)

The serial_number argument is a time value containing the time you want to find.
The MINUTE function
The MINUTE function extracts minutes (an integer between 0 and 59) from a time
code (a fraction of 24 hours).
The syntax : =MINUTE(serial_number)
The serial_number argument is a time value containing the minutes you want to find.
The SECOND function
The SECOND function extracts seconds (an integer between 0 and 59) from a time
code (a fraction of 24 hours).
The syntax : =SECOND(serial_number)
The serial_number argument is a time value containing the minutes you want to find.

- Page : 4 / 4
Informatique4 Second year ESMT

Course8: Dynamic links and mailing


Partie 01 : Dynamic links
1- work group
A workgroup is a set of sheets in a workbook selected together. As long as the
workgroup is established, any modification you make on the active sheet is also made on
all the other sheets of the workgroup, whether it is an entry, a formatting, or insertions, or
destruction of rows or columns, etc.

- Training of the working group:

Simply click with the [Ctrl] key on any tab to form a workgroup between the active
sheet and that of the tab. As soon as this is done, at the top of the sheet, the text “[Group]”
appears to the right of the workbook name.

You add or remove a sheet from the group by [Ctrl]-clicking on its tab.

If you want to integrate a whole series of sheets into a new group at once, activate
the first sheet then [Shift]-click on the name of the last one, then remove it with a [ Ctrl]-
click those that are in excess.

Example :

ESM -Tlemcen- Page : 1 / 5


Informatique4 Second year ESMT

2- Dynamic links between sheets in a workbook


A/ Internal dynamic links:
A formula may have a reference to a cell in another sheet that may be in another
workbook. Excel uses a special notation to handle this type of references.

To reference a cell in another sheet on the same workbook, use the following format:
Sheet_name!Cell_Address. So you must precede the address of the cell in question with the
name of the sheet followed by an exclamation point. If the sheet name contains a space, it
must be surrounded by apostrophes; Example: =’Sheet one’!A9

Example :

In this example cell A1 of sheet2 contains the product of cells A1 and B1 of sheet1.
For the use of ranges of cells with the same references, located on different sheets of the same
workbook; We indicate the name of the sheets, followed by an exclamation point, then the cell
reference.
Example: B10=sum(Sheet1:Sheet3!B2:C8)
B10=the sum of the values of all the cells in the ranges B2:C8 displayed on the 3 sheets.
B/ External dynamic links:
An external reference (or link) is a reference to a cell or range of cells in a worksheet in
another Excel workbook.
There are two ways to view external references to other workbooks, depending on
whether the source workbook is open in Excel or closed.
When the source is opened in Excel, the external reference contains the workbook name in
right brackets ([ ]), followed by the worksheet name, an exclamation point (!), and the cells
the formula depends on. For example, the following formula adds the cells in the range
C10:C25 in the Budget.xlsx workbook.

ESM -Tlemcen- Page : 2 / 5


Informatique4 Second year ESMT

External reference: =SUM([Budget.xlsx]Annual!C10:C25)

When the source is not open in Excel, the external reference contains the entire path.
External reference: =SUM(’C:\Reports\[Budget.xlsx]Annual’!C10:C25)

Partie 02 : Mailings (or Publipostage in French)

The mailings process allows you to create a set of documents from an Excel sheet,
for example letters sent to a large number of people. The unique information for each
letter or label comes from entries stored in a data source.
Excel sheet : Set of doc :
Model :

To illustrate this function, we will create a standard document with Word and use
an Excel file as a database.

The main steps in the mail merge process are:

• Step 01: Define the type document (for example: Word file).

• Step 02: Connect the document to a data source (for example: Excel file).

• Step 03: Add placeholders, called merge fields, to the standard document.

• Step 04: Preview and start the merge process.

ESM -Tlemcen- Page : 3 / 5


Informatique4 Second year ESMT

Before starting to create the standard document, you must first create a data source
via an Excel file (you can also use an Access database) containing the information
necessary for the mailing.

The commands to initiate a mail merge process are found on the Mailing tab.

Step 01: Define the standard document

The choice of the base document is made by

the “Start Mail Merge” menu.

Step 02: Connect the document to a data source

The connection to the data source is done by

the “Select Recipients” menu

Then: “Use existing list”

Step 03: Add merge fields

After connecting your base document to a data source, you can type the text for your
document and add placeholders indicating where the unique information will appear on
each copy of the document.

Placeholders are called merge fields. The fields displayed in Word correspond to the
column headers of the selected data file.

ESM -Tlemcen- Page : 4 / 5


Informatique4 Second year ESMT

• In a data file, lines represent records of information. Word generates a copy of the
base document for each record when initiating a mail merge process.

Step 04: Preview & Finish

You can preview your merged documents and make changes before starting the
actual merge process using the Preview Results tool.

- Complete the merge:

You can print the merged documents or edit them one by one. You can print or
modify all or part of the documents.

ESM -Tlemcen- Page : 5 / 5


SECOND YEAR ESMT
Computer sciences 4 :^*$
Course N° 9
Statistical functions
1. The AVERAGE function:
This function returns the (arithmetic) average of the arguments. It is represented in the form: Average
(nbr1; nbr2;…), it is equivalent to the sum of the arguments divided by their number.

Arguments can either be numbers or names, arrays, or references that contain numbers.

Logical values and text representations of numbers that you type directly into the list of
arguments are counted.

If an array or reference argument contains text, logical values, or empty cells, those values
are ignored; however, cells with the value zero are included.

Arguments that are error values cause errors.

If you want to include logical or text values in a reference as part of the calculation, use the
AVERAGEA function.

Note : in the AVERAGEA function : Arguments that contain TRUE evaluate as 1; arguments that
contain FALSE evaluate as 0 (zero). Array or reference arguments that contain text evaluate as 0 (zero).

EXAMPLES :
• Average (3; 7)  (3+7)/2.
• Average (B3: B8; “12”;FALSE)  (B3+B4+B5+B6+B7+B8+12+0)/8.
2. The “MIN” and “MAX” functions:
“Min” Returns the smallest number in the series of arguments, while “Max” returns the largest number.
(They ignore logical values and text)
EXAMPLES :
• Min (23; 13; 4; 8) = 4.
• Max (23; 13; 4; 8) = 23.
3. The COUNTA function:
Counts the number of cells that are not empty and the values included in the argument list.
Application: D2 = COUNTA (B2:B7).

Note: If you do not need to count logical values,


text, or error values, use the COUNT function.
1
4. The COUNTBLANK function:
The COUNTBLANK function allows you to determine the number of empty cells.
In the previous example: the formula : = COUNTBLANK(B2:B7) displays: 1
5. The MEDIAN function:
Returns the median value of the numbers. The median is the value
that lies in the center of a set of numbers. In other words, the
numbers belonging to the first half of the set have a value less than
the median, while those belonging to the other half have a value
greater than the median.
Syntax: MEDIAN (range1;number1;number2;range2)
- If the set contains an even number of numbers, the MEDIANE
function calculates the average of the two middle numbers.
- Arguments can be numbers, matrices, or references containing
numbers.
- If a matrix or reference used as an argument contains text,
logical values or empty cells, these values are not taken into account.
On the other hand, cells containing the value 0 are taken into
account.
6. The MODE function:
Displays the number with the greatest occurrence in a
group of numbers. Example: 
Syntax: MODE(number1;number2;...)

7. The Variance function:


The variance of a series of values is the average
of the squares of the differences between these
values and the mean of the series.
Syntax: VAR (number1;number2;number3;...)
Note1: VAR assumes that its arguments are a sample of the population. If your data represents the entire population, then
compute the variance by using VARP.

Note2: Empty cells, logical values or text in the array or reference are ignored if you use VAR
Note3: If you want to include logical and text values in a reference as part of the calculation, use the VARA function.
Note4: VARPA ?

2
8. The Standard deviation function: (Ecart-type in french)
Estimates standard deviation based on a sample. The standard deviation is a measure of how widely
values are dispersed from the average value (the mean).

Syntax: = STDEV (number1;number2;number3;...)


Example :

The 4 remarks of the fct VAR( ) are applied to STDEV( )

9. RANK
The RANK function allows you to give each value a ranking
(in ascending or descending order) Example : 
Syntax: RANK(number ; reference ; order)
number: The element whose rank we want to know.
reference: The list of elements. The rank is calculated based
on this reference.
order: Allows you to determine the order of classification:
• If the order argument has the value 0, the largest element in
the list will have rank 1
• If the order argument has the value 1, the smallest element
in the list will have rank 1

10- LINEST
The LINEST function calculates the statistics for a line in order to calculate a straight line that fits your
data as closely as possible, then returns a matrix that describes this line.
Syntax: LINEST(known_ys ; [known_xs] ; [constant] ; [statistics])

y_known. Series of y values already known by the relation y = mx + b

x_known [Optional]. Series of values x possibly already known by the relation y = mx + b


constant [Optional]. Logical value specifying whether the constant b must be forced to 0:
 If the constant argument is TRUE or omitted, the constant b is calculated normally.
 If the constant argument is FALSE, b is equal to 0 and the m values are adjusted so that y = mx
statistics [Optional]. Logical value indicating whether other statistics should be returned. (in this course = False)

Example:

3
11. Correlation Coefficient (belongs to [0,1])
This function returns the correlation coefficient of two ranges of cells. Use the correlation
coefficient to determine the relationship between two properties. For example, you can examine
the relationship between the average temperature of a home and the use of air conditioning.
Syntax: CORREL (matrix1; matrix2)
matrix1 : Range of cell values.
matrix2 : A second range of cell values. (must have the same size of matrix1)
A correlation coefficient close to 0 indicates low correlation or no correlation, and a coefficient
close to 1 indicates a high correlation between the two properties
Example

4
12- Determination Coefficient (belongs to [0,1])

The coefficient of determination is an index of the quality of the prediction of linear regression. The
closer it is to 1, the better the linear regression fits the data collected.

Coefficient of determination = (Correlation coefficient )2

Syntax: RSQ (y_known; x_known)

y_known: An array or range of data points

x_known: An array or range of data points. (must have the same size of y_known)

Example:

TRADUCTION :
N° ENGLISH FRENCH
1 AVERAGE Moyenne
Max Max
2
Min Min
3 COUNTA NBVAL
4 COUNTBLANK NB.VIDE
5 MEDIAN MEDIANE
6 MODE MODE
7 VAR VAR
8 STDEV ECARTYPE
9 RANK RANG
10 LINEST DROITEREG
11 CORREL COEFFICIENT.CORRELATION
12 RSQ COEFFICIENT.DETERMINATION

You might also like