Upgrading your skills with excel 2021

96 0 0
Upgrading your skills with excel  2021

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

=LEFT(A2;FIND( ;A2)1). Extracts the _rstname with the LEFT function, _nding the position of the space with the FIND function. =MID(A2;FIND( ;A2)+1;LEN(A2)). Extracts a text portion beginning after the position of the space till the length of the text. 1.5.1 A strange date that turns into a valid date A company codi_es its dates in a text format starting with the number 1. One of the reasons is for the data international

Trang 2

REMY LENTZNER

UPGRADING YOUR SKILLS WITH EXCEL

French original title: Excel, remise à niveau et perfectionnement EDITIONS REMYLENT, Paris, 1ère édition, 2021

The Intellectual Property Code prohibits copies or reproductions intended for collective use Any representation orreproduction in whole or in part by any means whatsoever, without the consent of the author or his successors in titleor cause, is unlawful and constitutes an infringement, pursuant to articles L.335-2 and following of Intellectual PropertyCode.

This book is dedicated to Anna and Maryvone.

I could not have written it without their support, advice, encouragements and proofreading.

Graphic illlustration : Bruno CONQUET

Trang 3

In the same collection

Improve your PivotTables with Excel Improve your skills with Google Sheets Programming macros with Google Sheets Getting started with HTML

Getting started with JavaScript Getting started with PHP & MySQL Google Gmail online

Google Docs online Google Slides online

Trang 4

1.1.2 Workshop : a body mass index calculation1.1.3 Some reminders about the formulas1.1.4 Extracting simple statistics

1.2 Formulas with dates

1.2.1 Difference between two dates1.2.2 Information about formulas

1.2.3 Adding a number of months to a date

1.2.4 The DATEDIF function for seniority calculations

1.4 The $ sign in formulas1.5 Formulas with text

1.5.1 A strange date that turns into a valid date1.5.2 The Flash-fill feature

Workshop1 : displaying all the dates for year 2018Workshop2 : Colouring the rows for year 20192.2 Top/bottom rules

2.3 Colouring empty cells2.4 The Data Bars

2.5 Icon Sets2.6 Colour scales

Trang 5

CHAPTER 3

Filtering, sorting out, layouts and printing

3.1 The filters

3.1.1 Creating a filter

3.1.2 Data with a format as table3.1.3 The Total row

3.2 Sorting out

3.3 Layouts and Printing

3.3.1 The viewing dialogue box3.3.2 The layout settings3.3.3 Setting the print area3.3.4 Inserting page breaks3.3.5 Viewing page breaks

5.1 The VLOOKUP function5.1.1 Finding a text value5.1.2 The #N/A error helps5.1.3 Finding a number in a scale5.1.4 Searching with a joker *5.1.5 VLOOKUP with two conditions5.2 The INDEX/MATCH functions

5.2.1 The INDEX function5.2.2 The MATCH function

5.2.3 INDEX and MATCH together5.3 Statistics with SUMIF and COUNTIF5.4 The SUMPRODUCT function

5.5 Locking formulas

5.5.1 Locking a sheet with the menu5.5.2 Leaving cells free to edit

Trang 6

5.5.3 Locking formulas with matrix5.5.4 Matrix functions.

5.6 Target value and data table5.6.1 The target value

5.6.2 Data table

Workshop 1 : A single-entry data tableWorkshop 2 : A double-entry data table

CHAPTER 6 Pivot tables

6.1 The structure of the source table6.1.1 Some structural constraints6.1.2 Creating a Pivot Table6.1.3 Designing a Pivot Table6.1.4 Refreshing the PivotTable6.1.5 Counting with a Pivot Table

6.1.6 Viewing the rows at the source of a result6.2 Calculation functions

Trang 7

Excel is a spreadsheet i.e a calculation software that adapts to the different business lines of any company To make a comparison with the world of medicine, we could say that Excel is a generalist program rather than a specialised one in a particular eld Indeed, Excel allows you to work with numbers such as turnover, amounts or quantities, but also with dates In addition it is easy to manipulate string characters such as codes or groups of letters Lots of functions are available to manipulate dates, numbers and texts The challenge is to learn how to use and memorize them.

Sometimes specialized knowledge is required to perform very complicated calculations Excel can help building engineers or architects who use complex formulas to nd out strength of materials or other designs Powerful statistics functions may be used to analyze data But Excel is able to adapt to your needs whether you are a professional or a student.

This book is organized in two parts The rst part (chapters 1 and 2) is a refresher course about Excel fundamentals It is intended for people who work with the spreadsheet occasionally without real training on the subject The aim is to review the Excel basics and carrying out formulas You will study how to perform tests between cells with the IF function The date formulas, the $ sign and the text manipulation will be described with lots of examples Special attention will be paid to the notion of cells coloring thanks to the very powerful feature called "Conditional Formatting" This tool allows you to color values according to the content of a cell For instance, if a cell contains the word "paid", then the line is automatically colored in red Filters will be studied because they represent a signi cant part of the daily work Indeed, it is often necessary to groups lines according to criteria You will also enjoy the right-click that provides a contextual menu and saves a lot of time Layouts will not be forgotten because it requires ne adjustments for printing This part ends with the setting up of several interesting charts that can be handled with Excel.

Trang 8

The second part (chapters 4, 5 and 6) is directed to people who already have an Excel experience It contains more powerful functions that can offer services for data management You will discover the searching functions as SEARCH and INDEX/EQUIV They are the basis for grouping data scattered in several sheets The functions SUMIF and COUNTIF will show their power in calculations with logical conditions A small tour with SUMPRODUCT will show an original way of adding values with date conditions You will be able to study the locking of formulas with the matrix mode and the Excel menus For managers who like to carry out hypotheses and commercial prospective, the Target Value and Data Tables features will be real assets Finally, the last chapter of this book will focus on Pivot Tables that are extraordinary tools for creating statistical reports.

This book is structured in six chapters.

Chapter 1 refreshes knowledge in Excel in order to calculate properly Chapter 2 studies conditional formatting with its highlighting rules, data bars and many other features.

Chapter 3 looks at the formatting techniques to print data easily You will also study the lters.

Chapter 4 deals with several charts : histograms, lines, trends, pie, bubble, map and others.

Chapter 5 looks at advanced functions that provide multiple services Chapter 6 presents the Pivot Tables where examples will show the power of this feature.

I hope that this book will allow you to progress with Excel and its numerous functions Please do not hesitate to contact me at the address REMYLENT@GMAIL.COM if you have any comments about this book.

Enjoy your reading.

Trang 9

The author

Trang 10

CHAPTER 1

Calculating rightly

Excel is usualy dedicated to calculations and thanks to its various functions and formulas, it renders countless services.

1.1 The working environment and formulas

Excel provides several menus and icons bars to work with A set of sheets named Sheet1, Sheet2, Sheet3, etc are available These sheets (also called tabs) can be renamed with the right-click Each time Excel is started, a blank workbook with 3 sheets opens You can switch from one sheet to another by simply clicking on the sheet name Figure 1.1 shows the menu.

Figure 1.1 : The Excel menu

Figure 1.2 shows the working environment.

Figure 1.2 : The working window.

A sheet has 1,048,576 rows and the last column is XFD The columns are labelled from left to right and arranged alphabetically: A, B, C, Z, AA, AB, AC, ,AZ, BA BZ, CA CZ XA XFD (16224 columns).

Trang 11

The address A3 is the intersection of the srt column and the third row.

The address A6:A10 is a range of cells from A6 to A10.

A cell can receive a numerical value, a text, a date and the the result of a formula You can insert a comment (right-click) to describe its content The comment can be deleted at any time.

When you enter a value in a cell, you can change it either by double-clicking it or by pressing the F2 key A formula always starts with the = sign or the + sign You could write in the cell A1 the simple formula =56*2 that would make Excel look like a nice calculator But Excel is structured to calculate with cell addresses rather than with simple values, like =A3+A9 or =(C5-C8)/F6*2%.

In a formula, you can mix the operation signs at will, parentheses, the % sign as like in mathematics.

To write a formula, you should manipulate the pointeur It helps to create the different addresses After the = sign, addresses will be displayed automatically Don't forget to nish the formula with the

Enter key.

When you enter a formula, it is also displayed in the formula bar A small green sign con rms the entry, while the red cross cancels it Caution: When you write calculations that depends on several formulas, any change in a parameter automatically triggers the recalculation of all the formulas This is the main principle of the

Trang 12

Figure 1.3 : Sales revenues

To see all the formulas, perform the below procedure:

Formulas / Show formulas

Figure 1.4 : Formulas in the sheet

To review the values, click again on the Show formulas icon.

To save time, you can copy-paste one formula with the copy handle as

shown in gure 1.5.

Figure 1.5 : Copying formulas

The following expressions shows how to perform totals:

=sum(B2:B6) Displays the total of the revenues for 2017.

=average(C2:C6) Displays the average of the revenues for 2018.

=sum(B2:B6;C2:6) Calculates the sum of the sales for the two

years A semicolon separates the two ranges of cells Figure 1.6 shows these formulas.

Trang 13

Figure 1.6 : Statistical formulas

1.1.2 Workshop : a body mass index calculation

Objective: Calculating your BMI (Body Mass Index) and displaying the

conclusion, using a LookUp function that handles ranges of values.

The formula for the calculation is:

BMI = weight/(size * size)

Figure 1.7 : BMI calculation

The weight and size data are distributed in cells B3 and B4 respectively Cell B5 contains the formula for the calculation of the BMI taking the values addresses into account Cell B6 contains the formula for searching the conclusion.

The formula =LOOKUP(B5; B9:B15; C9:C15) tells Excel to nd where

stands the B5 value in the range B9:B15 then nd the match in the other range C9:C15.

Trang 14

Because the value 28 is between 25 and 30, the result is "Overweight" If you change the weight or the size, the calculations will be redone

1.1.3 Some reminders about the formulas

B7 It indicates the intersection of column B and row 7.A1:B12 It means the block of cells from A1 to B12.=A1+B2 It displays the total of the two cells A1 and B2.

=(A2-A1)/A1*100 As many operators as required can be used.=SUM(A1:A4) Addition of the group of cells from A1 to A4.

=SUM(A1:B7;K9) Sum of the cells group A1 to B7 and cell K9.

The semicolon is an "and".

=AVERAGE(N1:N8) It calculates the average of the range of

=COUNTIF(A1:A7; "YES") Counts the number of times the word

"YES" appears in the range of A1 to A7.

=COUNTIF(A:A; "NOP") Counts the number of times the word

"NOP" appears in column A.

=COUNTIF(A:F; "OK") Counts the number of times the word "OK"

appears in column in columns A to F.

=COUNTIFS(B:B;"January";C:C;600) Counts the number of times

the word "January" appears in column B and the value 600

Trang 15

appears in column C, on the same line.

=SUMIF(C5:C16;">0") Sums all positive values in the range C5:

=SUMIF(A1:A200;"<0") Sums all negative values in the range A1

to A200.

=SUMIF(C:C; "*bet*"; G:G) Sums up the values inside column C

for the word "bet" that matches in the column G The stars are generic characters The string "bet" can be placed at the begining or at the end of the word.

=SUM(January:April!B3) It sums all B3 cells between the

January and April sheets, regardless of the number of sheets placed between these two tabs.

1.1.4 Extracting simple statistics

Figure 1.8 shows how to display simple statistics from a table.

Figure 1.8 : Simple statistics

The following list details the different calculations of the table inside row 7.

Discount calculation A discount is calculated by multiplying a

discount rate with the pre-tax value Here, the formula is

VAT calculation A VAT is calculated by multiplying a VAT rate

Trang 16

with the pre-tax value For France, the formula is =C7*20%

The total for all taxes Included It is calculated by adding the VAT

value with the pre-tax value then subtracting the discount The

formula is =C7-D7+E7.

The total of the column C is calculated using the SUM function.

The formula is = SUM (C7:C11).

The average of the column C is calculated using the AVERAGE

function The formula is = AVERAGE(C7:C11).

The total for January is calculated using a SUMIF function The

formula is =SUMIF(B7:B11;"January";F7:F11)

It makes a sum according to a logical condition.

The total for December is computed using a SUMIF function.

The formula is =SUMIF(B7:B11 ;"December";F7:F11).

The total for the values > 700 in column F is calculated with theformula: =SUMIF(F:F;">700").

The number of times January appears in range B7:B11 is

calculated with the formula: =COUNTIF(B7:B11;"January")

The number of times the word "Lectures" appears in column A

is calculated with the formula: =COUNTIF(A:A;"Lectures")

The total excluding October is calculated with the formula:

The average with a condition on the same column is calculated with the formula: =SUMPRODUCT ( (F7:F11) *(F7:F11<AVERAGE(F7:F11) ) ) This function uses matrices

placed in brackets The * sign is not the multiplier sign but a linking operator between matrices.

1.2 Formulas with dates

Excel proposes many functions that manipulate dates They are used in several areas: human resources, business management, industrial applications and others When you write a date with the form

Trang 17

dd/mm/yyyy, Excel actually stores a number Through this smart

mechanism, you will be able to add or substract a value to a date The result will be a number that you will format as a date with the menu options.

Figure 1.9 shows the today date and some calculation.

Figure 1.9 : Date calculations

1.2.1 Difference between two dates

Because a date is a number, you can perform a difference between two dates The result will be a value in the general display and will represent the number of days between these two dates It is possible to use some functions that also calculate the difference.

Figure 1.10 shows the calculations.

Figure 1.10 : Difference between two dates

1.2.2 Information about formulas

You can study the whole formulas thanks to the Formulas menu, as

shown gure 1.11.

Figure 1.11 : List of Excel formulas

By clicking the category, you will see a list of formulas You can also use the Excel formula builder ( gure 1.12) Make the functions list

Trang 18

appear then click on a function You will be able to enter the contents of the operand.

Figure 1.12 : List of Excel formulas

1.2.3 Adding a number of months to a date

The function EDATE allows you to add or subtract months to a date.The expression EDATE(B2;6) adds 6 months to the date in cell

The expression EDATE(B2;-5) removes 5 months from the date

in cell B2.

Figure 1.13 : Adding months to a date

The EOMONTH function allows you to nd dates at the end of a

The DAYS360 function calculates the difference between two

Trang 19

dates based on a 360-day year where 12 months of 30 days are involved The syntax is quite simple:

=Days360(StartDate;EndDate;method) The start date must be

less than the end date and the method parameter can be true (European method with) or false (American method).

1.2.4 The DATEDIF function for seniority calculations

There is a function called DATEDIF that is not documented in Excel

formulas because it comes from Lotus It allows you to extract information from a difference of two dates You can choose to see the result in days, months or years according to parameters It also enables to calculate the number of days/months or years of seniority For instance you want to know the exact number of years, months and days of your age, as 56 and 10 months and 6 days You will have to consider the number of full years rst, then the number of months between the last full year and the last non-full year, and nally the number of days after the last full month.

Figure 1.14 shows how to do this calculation.

Figure 1.14 : Seniority calculation

The following list details the different formulas.

Today's date The expression =today() is very handy and returns

the current date that changes every day If you need to display

today's date by using CTRL; keys.

Full years The calculation of the number of full years between

two dates is =DATEDIF(B1;B2;"Y")

Number of months left This number is given by the formula=DATEDIF(B1;B2;"YM").

Trang 20

Number of days left This number is given by the formula=DATEDIF(B1;B2;"MD").

Final formula use both formula =B3 & " years and " & B4 & "months and " & B5 & " days old" or =CONCATENATE(B3; " years and"; B4;" months and "; B5;" days old").

1.2.5 End of month

In France, since 1 January 2009, the deadline for paying the amounts due cannot exceed either 45 days at the end of the month or 60 calendar days from the date of issue of the invoice Excel has a

speci c EOMONTH function that allows you to immediately calculate

the payment date of an invoice.

Figure 1.15 shows an example of how to pay an invoice at 45 days end of month

Figure 1.15 : End of month calculation

The syntax of EOMONTH function is as follows:

=EOMONTH(starting date;number of months)

If the parameter for the number of months is 0, it is considered to be the current month With the value 1, it is 2 months, etc For instance, if today's date is 13/01/2021, then the expression

=END.MONTH(TODAY();1) will return 31/03/2021.

In the calculation, the payment date is at 45 days end of month The

expression used here =END.MONTH(B2+45;0) 45 days are added to

the invoice date that goes to the end of the current month 1.2.6 Calculation according to working days

It is possible to take public holidays and week ends into account to calculate a date thanks to the function WORKDAY.

Trang 21

Figure 1.16 shows its syntax.

Figure 1.16 : The workday function

In the formula, you have to de ne the range of cells that contain the holidays dates.

Figure 1.17 displays an example.

Figure 1.17 : Date calculation with workdays

1.3 The IF function

When you must compare values in Excel, use the IF function With it, you evaluate values contained in cells with a logical expression For instance, to compare two sales gures one in January and the other in February, you use an IF function with a logical condition whose

Trang 22

result triggers two different actions The rst will occur if the logical condition is true, the second if the condition is false.

The syntax is as follows:

= IF(logical condition;action1 if the condition is true; action2 if thecondition is false)

The expression =SI(C2>B2; "OK"; "HELP") displays the word "OK" if the condition C2>B2 is true Otherwise, the expression after the 2nd semicolon is used An if condition always contains 2 semicolons.

Figure 1.18 : The IF function.

1.3.1 Comparing a budget and expenditures Figure 1.19 compares a budget and expenditures.

Figure 1.19 : Comparison of a budget and expenditures.

If the expenses are higher than the budget then the word "ALERT" is displayed Otherwise the remaining amount is displayed, i.e the

Trang 23

Figure 1.20 : Data Bars

Data Bars come from the Conditional formatting feature To realize

these formats, follow the next steps:

Select the numerical values (B4:B7).

Conditional FormattingData Bars

Choose the color.

The green bullet comes from a new rule, always in the Conditional

formatting feature You will study it further in the book.

1.3.2 Nesting IF functions

It is sometimes necessary to nest several IF because of existing several conditions in the formula For instance, you need to nd a bonus calculated from a sale and based on the amount Let's consider a sale value of 2500€ If it is lower than 1000, there is no bonus If the sale value is higher than 1000 and lower than 2000, the bonus is 200.If the sale value is higher than 2000, the bonus is 500 Figure 1.21 shows the formula with several IF functions nested.

Figure 1.21 : Two IF functions nested

Here, two IF functions are suf cient to treat 3 conditions Four

conditions need three IF functions but beyond, the Lookup function

must be used.

1.3.3 The Lookup function

It is used when a scale of prices or anything else is required.Two columns are involved The rst one is for the scale and the second

Trang 24

one for the result Excel will search the value inside the scale then nd the bonus on the right column.

Figure 1.22 shows a case where 8 conditions are necessary to nd the bonus.

Between 0 and 1000, no bonus is granted Between 1000 and 2000, 100 is granted Between 2000 and 3000, 200 is granted Between 3000 and 4000, 500 is granted Between 4000 and 5000, 600 is granted Between 5000 and 8000, 700 is granted Between 8000 and 9000, 800 is granted Between 9000 and 10000, 1000 is granted.

It could not be reasonable to test the conditions with multiple IF functions.

Figure 1.22 : The lookup function for multiple conditions

Excel considers the E3 value (5500) and searches where it can be placed in the column A When the sale is found, the bonus from the column B is displayed in column F.

1.3.4 IF and AND

A logical expression may contain several conditions linked together For all the conditions to be true, each one must be true Conditions

Trang 25

are separated with an AND operator Figure 1.23 shows an example.

Figure 1.23 : A condition IF with an AND

The AND operator is placed just after the IF function Each condition in the AND operator is separated with a semi-colon.

The conditional expression could have been written as follows: =IF(B2="english";IF(C2="south";"transfer";"training"))

But it is easier to write numerous conditions with an AND operator than with several IF nested functions

The two conditions must be true here: The language is "english".

The area is south.

The notion of nothing is materialised by two empty quotation marks: =IF(AND(B2="english";C2="south");"transfer";"")

Figure 1.24 shows the different operators you can handle in Excel.

Figure 1.24 : Different operators

Trang 26

1.4 The $ sign in formulas

When you copy a formula down or elsewhere, the cell addresses change and adapt to the new rows or columns However, it is sometimes necessary to block an address when copying it For example, if a VAT rate is placed in a cell, its copy must not shift its position.

Let's take the following formula: =A2*(B7-B6) If you copy it down, it becomes: =A3*(B8-B7)

If you copy it to the right, it becomes: =B2*(C7-C6)

To block an address, the $ sign can be placed before the line number or before the letter in the column.

For example, the formula =A$2*(B7-B$6) blocks both rows 2 and 6 Copying this formula downwards will give: =A$2*(B8-B$6).

Similarly, the formula =$A2/G9 will block column A when copied to the right The result will be: =$A2/H9.

This feature (that uses $ signs) is sometimes called absolute addressing Figure 1.25 shows an example of addressing blocked when copying the formula to the right.

Tip: You can also use the F4 key several times to automatically place the $ sign when pointing addresses.

Figure 1.25 : The $ sign in an address.

The example below shows a formula in B6 that has been copied to

Trang 27

the right The B2 value must be blocked ($B2)in the formulas.

1.5 Formulas with text

Excel proposes many text manipulation functions that can be used

daily For example the LEFT function allows you to extract charactersfrom the left while the MID function makes it easy to extract

characters in the middle of a word The functions can be embedded The list below shows different text functions and the syntax to be used.

LEFT(A1;5) Extracts the rst 5 characters from the left in cell

RIGHT(A1;3) Extracts the last 3 characters from the right.

MID(A1;3;5) Extracts 5 characters from cell A1, starting at the

third character.

FIND("-";B2) Finds the position of the hyphen in B2 content.SUBSTITUTE(A3;"/";"") Replaces all / characters with the

-character in cell A3.

CONCATENATE(A1;"-";B1) Sticks the content of each part: the

content of cell A1 follows with a dash then with the content of cell B1.

=A1 & "@" & A4 Stick cells together.

PROPER(A1) Converts a text string to proper case; the rst

letter in each word to uppercase and all other letters to lowercase.

UPPER(D5) Converts the content of cell D5 to upper case.LOWER(F2) Converts the contents of cell F2 to lowercase.LEN(A2) Displays the number of characters of A2 cell.

Figure 1.26 displays some text formulas.

Trang 28

Figure 1.26 : The text formulas

The following formulas extracts part of characters from a cell.

Figure 1.27 shows how to handle the LEFT, RIGHT, MID, FIND and LEN

Figure 1.27 : Extracting part of texts

=LEFT(A2;FIND(" ";A2)-1) Extracts the rstname with the LEFT

function, nding the position of the space with the FIND function.

=MID(A2;FIND(" ";A2)+1;LEN(A2)) Extracts a text portion beginning

after the position of the space till the length of the text 1.5.1 A strange date that turns into a valid date

A company codi es its dates in a text format starting with the number 1 One of the reasons is for the data international

Trang 29

compatibility With some text functions, invalid dates can be converted into valid format.

Figure 1.28 shows these odd dates that cannot be ltered or sorted.

MID, RIGHT and DATE functions can solve the problem.

Figure 1.28 : Special dates

It could have been possible to integrate these three functions in one

1.5.2 The Flash-fill feature

Starting with Excel 2013, a new feature called Flash- ll allows you to

cut texts without any formulas The result is placed in a new column The principle is as follows:

Place the data to be cut in one column.

In the adjacent column, enter the rst word Excel must carry out.

Trang 30

Data / Flash-Fill Excel will immediately extract and display the

words searched.

Figure 1.29 shows this innovative feature.

Figure 1.29 : Flash- ll.

In brief

In this chapter you have studied how to make simple or complex calculations with formulas You have manipulated dates with dedicated functions and you can now test the cell contents with the IF function The $ sign placed in formulas allows you to block cells when copying formulas Finally, you have manipulated text functions to extract pieces of characters.

Chapter 2 deals with conditional formatting i.e the automatic colouring of values.

Trang 31

CHAPTER 2

Conditional formatting

Conditional formatting allows groups of values to be colored according to one or more logical conditions For example, in a salary column you can colour in red the values below 1800 It is also possible to color an entire line according to a condition thanks to a formula This formatting features enable to analyse the information Highlight Cells Rules

Figure 2.1 : The menu.Text that Contains

Specify the text and choose the color.

Trang 32

Figure 2.2 : Highlighting speci c textOK

2.1.1 Clearing rules

To clear some rules already de ned, follow the steps below: Select the cells

Home / Conditional formattingClear Rules

Clear Rules from Selected cells

Caution When you perform several rules on the same range, they all add up to each other It is not a bad idea to clear the rules before adding others.

2.1.2 Using a formula to highlight cells

Figure 2.3 shows a list in which each sector is colored in red only for the value de ned in the cell F2 To perform this feature, you have to write a formula in a new rule.

Figure 2.3 : Highlighting text according to a cell content

Select the range to be highlighted (C1:C7 or C:C).

Trang 33

Home / Conditional formattingNew Rule

Choose the style Classic.

Use a formula to determine which cells to format

Figure 2.4 : New Formatting Rule

Type the formula that apply to the range selected =IF($F$2=$C1;TRUE;FALSE)

It is very important to place the $ sign rightly $C1 blocks the column C but leaves the potential highligting to the other rows $F$2 blocks the cell F2 completely.

The parameter TRUE means that if the conditional expression is true then the color apply the cells.

The parameter FALSE means that if the conditional expression is false then the color does not apply the cells.

2.1.3 Highlighting values

It is very easy to highlight values according to several conditions proposed in the menu Figures 2.5 and 2.6 show the different possibilities.

Trang 34

Figure 2.5 : Highlighting Cells Rules

Figure 2.6 : Top/Bottom Rules

The example below displays in yellow all the salaries that are less than 2900.

Figure 2.7 : Values highlighted

Figure 2.8 : A condition for highlighting

2.1.4 Identifying duplicates

There are several ways to deal with duplicates You can ignore them, delete them, or mark them with conditional formatting.

The following procedure shows how to color duplicate values.

Trang 35

Select the cells to be coloured.

Home / Conditional formattingHighlight Cells Rules

Duplicate valuesDuplicate

By choosing the other choice Unique in the the drop-down list, Excel

will color the single values.

Figure 2.9 : Coloring duplicates

2.1.5 Highlighting dates

Excel proposes rather original choices to highlight dates ( gure 2.10).

Figure 2.10 : Highlighting part of dates

Here is the method to perform this type of search Select the cells to be coloured.

Home / Conditional formattingHighlight Cells Rules

A date occuring

Trang 36

Figure 2.11 shows some dates for the technicians last medical visit and the criteria for a research.

Figure 2.11 : The last medical visit

Workshop1 : displaying all the dates for year 2018 Enter the start date and the end date in column E Select all the column B

Home / Conditional formattingHighlight Cells Rules

In the rst zone, point to the start date and in the second zone, point to the end date.

Workshop2 : Colouring the rows for year 2019

Figure 2.12 shows the same table with rows coloured in yellow only for the year 2019.

Trang 37

Figure 2.12 : Rows colored

Select all the table (A1:B8 or A:B).

Home / Conditional formattingNew Rule

Choose the style Classic.

Use a formula to determine which cells to formatType the formula

Select the cells to be colored (B2:B6)

Home / Conditional formatting

Top/Bottom Rules

Top 10 items The 10 highest values are shown but you can

choose to increase or decrease this number using a drop-down list.

Top 10% Displays 10% of the highest values You can choose

to increase or decrease this number using a drop-down list.

Bottom 10 items The 10 lowest values are shown but you can

choose to increase or decrease this number using a drop-down

Trang 38

Bottom 10% Displays 10% of the lowest values You can

choose to increase or decrease this number using a drop-down

2.3 Colouring empty cells

This option allows you to view at a glance all the cells that are not lled in.

Select the cells.

Home / Conditional formattingNew rule

Choose the classic style.

Only format cells that contain

Choose Blank

Choose a colour

Figure 2.14 : A rule for blank cells

Figure 2.15 shows blank cells coloured in green.

Trang 39

Figure 2.15 : Blank cells selected

2.4 The Data Bars

Displaying Data Bars allows you to view small and large values very quickly You will be able to analize your data better Follow the next procedure to set up these visual bars.

Select the data.

Home / Conditional formattingData Bars

Select the color.

Figure 2.16 : Data Bars

If you want several colours, apply the Data Bars one by one Figure 2.17 shows the different colours.

Figure 2.17 : Data Bars colours

Select More Rules if tou want more parameters.

Trang 40

Figure 2.18 : More Data Bars parameters

2.5 Icon Sets

Excel can display icons according to several logical conditions.

Home / Conditional formatting

Ngày đăng: 16/04/2024, 08:03

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan