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

Excel - Part II

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

Excel - Part II

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

II - Automatic Formatting and Functions

Format as table:
Quickly convert a range of cells to a table with its own style.

Conditional Formatting
Conditional Formatting allow you to apply formats to a cell or range of cells, and have that
formatting change depending on the value of the cell or the value of a formula.

For example, you can have a cell appear bold only when the value of the cell is greater than 100.

Page 1 of 8
If the Highlight Cells Rules, Top/Bottom Rules, Data Bars, Color Scales and Icon Sets are not sufficient,
you can create a new rule.

Page 2 of 8
Conditional Formatting Rules Managers:

Page 3 of 8
FUNCTIONS
To calculate a function:

▪ Click the cell where you want the function applied


▪ Click the Insert Function button
▪ Choose the function
▪ Click OK

a. Function: SUM (Field)


SUM: Adds all cells in the argument

Syntax:
SUM (number1, number2,...)
Example 1: Calculate the sum of the cells B2, B3, B4, and B5:

B6 = SUM(B2:B5) or SUM(B2,B3,B4,B5)

Example 2:

b. The Function: AVERAGE (field)


Average: Calculates the average of the cells in the argument

Syntax:
AVERAGE(number1, [number2], ...)
Returns the average (arithmetic mean) of the arguments. For example, if the range B2:B5 contains
numbers, the formula =AVERAGE(B2:B5) returns the average of those numbers.

Page 4 of 8
B6: = AVERAGE(B2:B5)

E6: = AVERAGE(E2,G2,I2)

c. IF Function: IF(Conditions,action1,action2)
Use the IF function, one of the logical functions, to return one value if a condition is true and
another value if it's false.
Syntax:
IF(logical_test, value_if_true, [value_if_false]) : It simply tells Excel that if a condition is true,
perform action A, otherwise, perform action B.
logical_test (required) The conditions you want to test.
The value that you want returned if the result of logical_test is
value_if_true (required)
TRUE.(Action1)
The value that you want returned if the result of logical_test is
value_if_false (optional)
FALSE. (action2)
Condition:
A logical operator is used in Excel to compare two values.
Any expression equal to true or false is built by a logical operator taken from the following list :
> Greater than
>= Greater than or Equal To
< Less than
<= Less than or Equal To
= Equal to
<> Not Equal To
Example: B4 < 40 the cell B4 is true while the value less than 40, else false
ACTION: Any valid expression in excel having the desired value.

Page 5 of 8
a. AND Function (Condition1, condition2, …) and OR Function
(Condition1,condition2, …)
Allows writing the complex conditions
• AND Function
Returns TRUE if all its arguments evaluate to TRUE; returns FALSE if one or more arguments evaluate to
FALSE.

AND (Condition1, condition2, …)


Condition:
A logical operator is used in Excel to compare two values.
Any expression equal to true or false is built by a logical operator taken from the following list :
> Greater than
>= Greater than or Equal To
< Less than
<= Less than or Equal To
= Equal to
<> Not Equal To

• OR Function
Returns TRUE if only one argument evaluate to TRUE; return FALSE if all its arguments evaluate to
FALSE.
OR(Condition1, condition2, …)

Condition:
A logical operator is used in Excel to compare two values.
Any expression equal to true or false is built by a logical operator taken from the following list:
> Greater than
>= Greater than Or Equal To
< Less than
<= Less than Or Equal To
= Equal to
<> Not Equal To

Page 6 of 8
Workshop II
Ex 1:
1. In the "Discount" column, if the amount of the sales order exceeds 10,000 Euros
display "YES" otherwise display "NO"
2. In column D, calculate the amount of discount, knowing that it is 2%
3. Apply a conditional format to the table above.

Client Name Order Amount Discount Discounted Amount


PHILEAS 8,000.00 NO -
FOGG 7,500.00 NO -
FABRICE 18,500.00 YES 370.00
DELDANGO 12,600.00 YES 252.00
ROBINSON 6,000.00 NO -
CRUSOE 14,000.00 YES 280.00
MARGUERITE 14,000.00 YES 280.00
GAUTHIER 1,200.00 NO -
CATHERINE 11,000.00 YES 220.00
MAHEU 100.00 NO -
LUCIEN 3,000.00 NO -
LEUWEN 800.00 NO -

Ex 2:
Total Net excluding
Name Client Type Gross Duty Discount
Discount taxes
CHRISJAN wholesaler 14650
VISIRIE Retailer 8703
GUENOLA Particular 14540
CASIQUE Wholesaler 8775
GENODI Particular 7602
AGMIR Wholesaler 11215
FERZIT Retailer 8703
VALEZI Retailer 17525

A- The discount rate is 3% if the Gross Duty exceeds € 10,000


For wholesaler this rate is 5% (provided that the Gross Duty exceeds € 10,000)
B- Marked in red the 5% Discount results (Conditional Formatting)

Correction:
Total Net excluding
Name Client Type Gross Duty Discount
Discount taxes
CHRISJAN Wholesaler 14650 5% 732.50 13,917.50
VISIRIE Retailer 8703 0% - 8,703.00
GUENOLA Particular 14540 3% 436.20 14,103.80
CASIQUE Wholesaler 8775 0% - 8,775.00
GENODI Particular 7602 0% - 7,602.00
AGMIR Wholesaler 11215 5% 560.75 10,654.25
FERZIT Retailer 8703 0% - 8,703.00
VALEZI Retailer 17525 3% 525.75 16,999.25

Page 7 of 8
Ex 3:
• Calculate the average of each student
• Indicate whether the student was Passed or failed in the Status column (with the formula If)
• Calculate the average of the class by subject and the total average
• Add to the student a bonus equal to +1/20 if he passed and has an average less than the class average.
• Apply an automated formatting to the below table
• Apply a conditional formatting to the below table : If the bonus = 1 Highlight the cell in Red

Name Test1 Test2 Test3 Average Status Bonus


Joe 12 10 10
Ahmad 13 12 11
Elie 14 14 12
Chris 10 12 14
Ralph 8 9 8
Denise 9 8 15
Hassan 12 7 10
Joy 17 16 14
Carlos 9 16 12
Average
per Course

Correction:

Name Test 1 Test 2 Test 3 Average Status Bonus


Joe 12 10 10 10.67 Pass 1
Ahmad 13 12 11 12.00 Pass 0
Elie 14 14 12 13.33 Pass 0
Chris 10 12 14 12.00 Pass 0
Ralph 8 9 8 8.33 Fail 0
Denise 9 8 15 10.67 Pass 1
Hassan 12 7 10 9.67 Fail 0
Joy 17 16 14 15.67 Pass 0
Carlos 9 16 12 12.33 Pass 0
Average
11.56 11.56 11.78 11.63
per Course

Page 8 of 8

You might also like