0% found this document useful (0 votes)
10 views

Excel - Part III

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)
10 views

Excel - Part III

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/ 16

III - Additional Functions

1. Today()
The Today Function Returns the Current Date

2. MAX(number1, [number2], ...)


The Microsoft Excel MAX function returns the largest value from the numbers provided.
The MAX function syntax has the following arguments:

• Number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to 255
numbers for which you want to find the maximum value.

3. MIN(number1, [number2], ...)


The MIN function Returns the smallest value from the numbers provided.
The MIN function syntax has the following arguments:

Page 1 of 52
• Number1, number2, ... Number1 is optional, subsequent numbers are optional. 1 to 255
numbers for which you want to find the minimum value.

1. TRUNC(number, [num_digits])

The TRUNC function returns a number truncated to a specified number of digits.


The TRUNC function syntax has the following arguments:

• Number Required. The number you want to truncate.


• Num_digits Optional. A number specifying the precision of the truncation. The default value for
num_digits is 0 (zero).

2. ROUND(number, num_digits)

The ROUND function rounds a number to a specified number of digits.

The ROUND function syntax has the following arguments:

• number Required. The number that you want to round.


• num_digits Required. The number of digits to which you want to round the number argument.

Page 2 of 52
3. COUNT (value1, [value2] ...)

The COUNT function counts the number of cells that contain numbers

The COUNT function syntax has the following arguments:

• Value1 Required. The first item, cell reference, or range within which you want to count
numbers.
• Value2 Optional. Up to 255 additional items, cell references, or ranges within which you want to
count numbers.

Note The arguments can contain or refer to a variety of different types of data, but only numbers are
counted.

Example:

Page 3 of 52
7. COUNTA (value1, [value2] ...)

The COUNTA function counts the number of cells that are not empty in a range.
The COUNTA function syntax has the following arguments:

• value1 Required. The first argument representing the values that you want to count.
• value2, ... Optional. Additional arguments representing the values that you want to count, up to a
maximum of 255 arguments.

The COUNTA function counts cells containing any type of information, including error values and empty
text (""). For example, if the range contains a formula that returns an empty string, the COUNTA function
counts that value. The COUNTA function does not count empty cells.

Sorting & Filtering


Sorting and Filtering allow you to manipulate data in a worksheet based on given set of criteria.
Basic Sorts
To execute a basic descending or ascending sort based on one column:

▪ Highlight the cells that will be sorted


▪ Click the Sort & Filter button on the Home tab
▪ Click the Sort Ascending (A-Z) button or Sort Descending (Z-A) button

Custom Sorts
To sort on the basis of more than one column:

▪ Click the Sort & Filter button on the Home tab


▪ Choose which column you want to sort by first
▪ Click Add Level
▪ Choose the next column you want to sort
▪ Click OK

Page 4 of 52
Filtering
Filtering allows you to display only data that meets certain criteria. To filter:

▪ Click the column or columns that contain the data you wish to filter
▪ On the Home tab, click on Sort & Filter
▪ Click Filter button
▪ Click the Arrow at the bottom of the first cell
▪ Click the Text Filter
▪ Click the Words you wish to Filter

▪ To clear the filter click the Sort & Filter button


▪ Click Clear

Exercise:
Full Name Dressing Date of Sale Area Shop Amount
type
Roger Shirt 21/09/2013 Maten Big Star 45
Simon Jeans 05/06/2014 Beirut DT 60
Kate Skirt 08/02/2014 Keserwan Zara 150
Tony Tie 09/06/2015 Maten Boss 255
Joy Shirt 15/10/2015 Maten ABC 85
kate Shirt 25/08/2015 Beirut Mango 250
Simon Jeans 31/07/2014 Ashrafieh ABC 156
Kate Tie 29/04/2015 Beirut DT 65
Joy Jeans 03/03/2015 Ashrafieh ABC 125
Joy Skirt 19/06/2015 Keserwan Zara 45
Roger Tie 01/02/2015 Maten ABC 145

Page 5 of 52
Questions
1- Sort the table by Full name in ascending order and Area in descending
2- Filter all Area that the amount between 150 and 255.
3- Filter all area who works in Beirut.
4- Filter the table below using "Advanced Filter" based on the following criteria:
Amount> = 50 or Full Name= Joy
Amount> 65 and dressing type = Shirt

Create a slicer to filter data

Slicers provide buttons that you can click to filter tables

1. Click anywhere in the table.


2. On the Home tab, go to Insert > Slicer.

3. In the Insert Slicers dialog box, select the check boxes for the fields you want to display,
then select OK.
4. A slicer will be created for every field that you selected. Clicking any of the slicer buttons
will automatically apply that filter to the linked table.

Notes:

• To select more than one item, hold Ctrl, and then select the items that you want to
show.
• To clear a slicer's filters, select Clear Filter in the slicer.

Apply data validation to cells


You use data validation to control the type of data or the values that users enter into a cell. For example,
you may want to restrict data entry to a certain range of dates, limit choices by using a list, or make sure
that only positive whole numbers are entered.
This article describes how data validation works in Excel and outlines the different data validation
techniques available to you. It does not cover cell protection, which is a feature that lets you "lock" or hide
certain cells in a worksheet so that they can't be edited or overwritten.

What is data validation?


Data validation is an Excel feature that you can use to define restrictions on what data can or should be
entered in a cell. You can configure data validation to prevent users from entering data that is not valid. If
you prefer, you can allow users to enter invalid data but warn them when they try to type it in the cell. You
can also provide messages to define what input you expect for the cell, and instructions to help users
correct any errors.
For example, in a marketing workbook, you can set up a cell to allow only account numbers that are
exactly three characters long. When users select the cell, you can show them a message such as this one:

Page 6 of 52
If users ignore this message and type invalid data in the cell, such as a two-digit or five-digit number, you
can show them an actual error message.
In a slightly more advanced scenario, you might use data validation to calculate the maximum allowed
value in a cell based on a value elsewhere in the workbook. In the following example, the user has typed
$4,000 in cell E7, which exceeds the maximum limit specified for commissions and bonuses.

If the payroll budget were to increase or decrease, the allowed maximum in E7 would automatically
increase or decrease with it.
Data validation options are located in the Data Tools group.

You configure data validation in the Data Validation dialog box.

Page 7 of 52
When is data validation useful?
Data validation is invaluable when you want to share a workbook with others in your organization, and you
want the data entered in the workbook to be accurate and consistent.
Among other things, you can use data validation to do the following:

• Restrict data to predefined items in a list For example, you can limit types of departments to
Sales, Finance, R&D, and IT. Similarly, you can create a list of values from a range of cells
elsewhere in the worksheet.

• Restrict numbers outside a specified range For example, you can specify a minimum limit of
deductions to two times the number of children in a particular cell.
• Restrict dates outside a certain time frame For example, you can specify a time frame between
today's date and 3 days from today's date.
• Restrict times outside a certain time frame For example, you can specify a time frame for
serving breakfast between the time when the restaurant opens and 5 hours after the restaurant
opens.
• Limit the number of text characters For example, you can limit the allowed text in a cell to 10
or fewer characters. Similarly, you can set the specific length for a full name field (C1) to be the
current length of a first name field (A1) and a last name field (B1), plus 10 characters.
• Validate data based on formulas or values in other cells For example, you can use data
validation to set a maximum limit for commissions and bonuses of $3,600, based on the overall
projected payroll value. If users enter more than $3,600 in the cell, they see a validation message.

Data validation messages


What users see when they enter invalid data into a cell depends on how you have configured the data
validation. You can choose to show an input message when the user selects the cell. This type of message
appears near the cell. You can move this message, if you want to, and it remains until you move to another
cell or press ESC.

Input messages are generally used to offer users guidance about the type of data that you want entered in
the cell.
You can also choose to show an error alert that appears only after users enter invalid data.

Page 8 of 52
You can choose from three types of error alerts:
Icon Type Use to
Prevent users from entering invalid data in a cell. A Stop alert message has two
Stop
options: Retry or Cancel.
Warn users that the data they entered is invalid, without preventing them from entering
Warning it. When a Warning alert message appears, users can click Yes to accept the invalid
entry, No to edit the invalid entry, or Cancel to remove the invalid entry.
Inform users that the data they entered is invalid, without preventing them from
Information entering it. This type of error alert is the most flexible. When an Information alert
message appears, users can click OK to accept the invalid value or Cancel to reject it.
You can customize the text that users see in an error alert message. If you choose not to do so, users see a
default message.

Connect to (Import) external data

The main benefit of connecting to external data is that you can periodically analyze this data in Microsoft
Office Excel without repeatedly copying the data, which is an operation that can be time-consuming and
error-prone. After connecting to external data, you can also automatically refresh (or update) your Excel
workbooks from the original data source whenever the data source is updated with new information.

Page 9 of 52
Important Connections to external data may be disabled on your computer. To connect to data when you
open a workbook, you must enable data connections by using the Trust Center bar, or by putting the
workbook in a trusted location.

1. On the Data tab, in the Get External Data group, click Existing Connections.

2. In the Existing Connections dialog box, in the Show drop-down list, do one of the following:
o To display all connections, click All Connections. This is selected by default.
o To display only the recently used list of connections, click Connections in this
Workbook.

This list is created from connections that you have already defined, that you have created
by using the Select Data Source dialog box of the Data Connection Wizard, or that you
have previously selected as a connection from this dialog box.

o To display only the connections that are available on your computer, click Connection
files on this computer.

This list is created from the My Data Sources folder that is usually stored in the My
Documents folder.

o To display only the connections that are available from a connection file that is accessible
from the network, click Connection files on the Network.

3. Tip If you do not see the connection that you want, you can create a connection. Click Browse
for More, and then in the Select Data Source dialog box, click New Source to start the Data
Connection Wizard so that you can select the data source that you want to connect to.
4. Note If you choose a connection from the Connection files on the network or Connection files
on this computer categories, the connection file is copied into the workbook as a new workbook
connection, and then it is used as the new connection information.
5. Select the connection that you want, and then click Open.
6. In the Import Data dialog box, under Select how you want to view this data in your workbook
do one of the following:

Important The Select how you want to view this data in your workbook section and its
options, as shown in the following list, are not available for text, Web Query, and XML data
connections. If you are connecting to such data, continue to step 5.

o To create a table for simple sorting and filtering, click Table.

Page 10 of 52
o To create a PivotTable report for summarizing large amounts of data by aggregating and
subtotaling the data, click PivotTable Report.
o To create a PivotTable report, and PivotChart report for visually summarizing data, click
PivotChart and PivotTable Report.
o To store the selected connection in the workbook for later use, click Only Create
Connection.

Use the Only Create Connection option to store the selected connection in the workbook
for later use. For example, if you are connecting to an Online Analytical Processing
(OLAP) cube data source and you intend to convert PivotTable cells to worksheet
formulas by using the Convert to Formulas command (On the Options tab, in the Tools
group, click OLAP tools), you can use this option because you don't need to save the
PivotTable report.

7. Under Where do you want to put the data?, do one of the following:
o To place the PivotTable or PivotChart report in an existing worksheet, select Existing
worksheet, and then type the first cell in the range of cells where you want to locate the
PivotTable report.

Page 11 of 52
Page 12 of 52
Workshop III

Ex1:
Hours January February March
1---10 521,456 565,412 501,450
11---20 487,152 512,345 658,742
>21 485,478 496,542 581,245
Total 1,494,086 1,574,299 1,741,437

Result
2000000
1800000
1600000
1400000
1200000
1000000
800000
600000
400000
200000
0
1 ---10 11---20 > 21 Total

January February March

Ex 2:
Reference Unit discount Net Price Quantity Total
Price 3%
Windows 8.1 standard
edition 239 21
Windows 10 399 14
Office 2013 589 5
Autocad 54.9 24
Antivirus Norton 2015 119.9 12
Power DVD 78.5 31
Works Suite 2013 199 10
Nav2016 74.5 13

Page 13 of 52
Correction:
Reference Unit discount Net Price Quantity Total
Price 3%

€ 239.00 € 231.83 21 € 4,868.43
Windows 8.1 standard edition 7.17

€ 399.00 € 387.03 14 € 5,418.42
Windows 10 11.97

€ 589.00 € 571.33 5 € 2,856.65
Office 2013 17.67

€ 54.90 € 53.25 24 € 1,278.07
Autocad 1.65

€ 119.90 € 116.30 12 € 1,395.64
Antivirus Norton 2015 3.60

€ 78.50 € 76.15 31 € 2,360.50
Power DVD 2.36

€ 199.00 € 193.03 10 € 1,930.30
Works Suite 2013 5.97

€ 74.50 € 72.27 13 € 939.45
Nav2016 2.24
Total: € 21,047.45

Ex 3:
View in column C the rate of VAT corresponding to the code entered in column B

CODE TVA1 = 2.10%


CODE TVA2 = 5.50%
CODE TVA3 = 19.60%

Items CODE TVA TAUX TVA


Screen 2
Desktop 1
Printer 3
Camera 1
Keyboard 1
Scanner 3

Correction:
CODE
Items TVA TAUX TVA
Screen 2 5.50%
Desktop 1 2.10%
Printer 3 19.60%
Camera 1 2.10%
Keyboard 1 2.10%
Scanner 3 19.60%

Page 14 of 52
Ex 4
Need a graphical representation of your sales for 2002 till 2005.
She is seeking the following charts:
A graph of the total sales over this period
A graph representing the evolution of sales in the North East.
A graph showing the distribution of sales in 2002.
A graph showing the distribution of sales in 2005.
You will find below the data table from which you must build all required graphs.

Sales breakdown

2002 2003 2004 2005


Nord Est 22,000 23,400 23,200 25,100
Nord Ouest 24,600 26,600 25,100 27,600
Sud Est 14,100 16,500 17,800 18,200
Sud Ouest 19,300 15,100 16,300 16,700
Ile de France 11,700 12,200 12,800 12,900
Total 91,700 93,800 95,200 100,500

30,000 Nord Est


25,000 25,500
25,000
20,000 24,500
24,000
15,000 23,500
Axis Title

23,000
10,000
22,500
22,000 Nord Est
5,000
21,500
- 21,000
2002 2003 2004 2005 20,500
20,000
Nord Est Nord Ouest
2002 2003 2004 2005
Sud Est Sud Ouest
Axis Title
Ile de France

Page 15 of 52
2005

13%
25% Nord Est
Nord Ouest
17%
Sud Est
Sud Ouest

18% 27% Ile de France

Nord Est Nord Ouest Sud Est


Sud Ouest Ile de France

Ex 5:

Page 16 of 52

You might also like