Variance is a value that shows how “**varied**” a certain data is, and in mathematics it is used mainly in statistics and probabilities.

To calculate the variance, we

① Calculate the average difference for each data

② Square each of the differences

③ Add all calculated values

④ Divide everything by the number of data

The steps might be simple, but for people who do not understand ‘variance’, it might be hard to understand the meaning to these steps.

In that case, remember that

**“The smaller the calculated value, the smaller the data variance”**

In other words, the more the value is closer to ‘0’, the less the data is varied.

To calculate the variance in a data, we use the VAR function.

=VAR(number1, [number2]…)

**[number1] = Select the 1st value or range to calculate the variance.
[number2] = Not obligatory. Select if there are other data to calculate the variance.
**

Definition of function | A function to calculate the variance of a selected data |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

Below are end-of-year biology exam scores according to classes.

We will calculate the average for each class and look at the variance of scores.

① Calculate the variance for class ‘1-A’.

(1) [number] : Select cell range [C6:C11].

=VAR(C6:C11)

② Calculate the variance for class ‘1-B’.

(1) [number] : Select cell range [F6:F11].

=VAR(F6:F11)

We have successfully calculated variance for these 2 data.

POINT!

**How to “analyze” (read) the data using the calculated variance**

We have discussed the meaning of variance above, but here we will look at how to ‘analyze the data’ using the variance value.

**How to analyze the data①**

Firstly, in this data, the average score for class ‘1-B’ is higher than that of class 1-A.

This indicates from first sight that “**students from class 1-B are better at Biology **“.

**How to analyze the data②**

Next, if we look at the variance, class ‘1-A’ has a smaller value than class 1-B.

This indicates that “**more students from class 1-A were able to achieve a score close to the average**“.

Below is what we can see from ① and ②:

**In class [1-B], there are students that are capable of achieving high scores, yet there are variances between the students. There is a big academic skill variance in this class.**

**In class [1-A], there are no students that have excellent scores, but the variance between students is small. There is a smaller academic skill variance in this class.**

While it seems that class 1-B seems to have better grades overall, it is important to remember that variance between student grades are also important when analyzing data like these.

To calculate the variance in a specific data, we can also use the VARP function.

=VARP(number1, [number2]…)

**[number1] = Select the 1st value or range to calculate the variance.
[number2] = Not obligatory. Select if there are other data to calculate the variance.
**

Definition of function | A function to calculate the variance of a selected data |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

The method is the same as the VAR function, but the results show up differently.

① Calculate the variance for class ‘1-A’.

(1)[number] : Select cell range [C6:C11].

=VARP(C6:C11)

② Calculate the variance for class ‘1-B’.

(1)[number] : Select cell range [F6:F11].

=VARP(F6:F11)

The results that we get in the VAR function and the VARP function are different because the conditions in each function are different.

In the beginning, we have discussed that there are 4 steps in calculating the variation:

① Calculate the average difference for each data

② Square each of the differences

③ Add all calculated values

④ Divide everything by the number of data

The difference lies in step④, and this is what makes the result come out different from the VAR function and VARP function.

Below we discuss the difference of the VAR function and the VARP function.

The VAR function:

The VAR function identifies the selected data as a ‘**sample**‘ (A section of the whole data).

As the whole data number is unknown, in ④, the VAR function divides all the calculated values by the ‘**selected data-1 (minus 1)**‘, and try to avoid a biased result.

The VARP function:

We use the VARP function when the selected data is ‘**complete**‘ (i.e. all data is selected and there are no others).

**Complete data = selected data **for this function.

Furthermore, when calculating the variance, the ‘expected value’ (=accuracy of actual variance) becomes important and below are examples.

- When there is a difference in the number of students between class A and class B, dividing the values by the ‘selected data-1 (minus 1)’ will make the expected value equal in each class. However, when dividing them merely by the ‘selected data’, the variance will tend to be smaller of that of the class with the smaller number of students.
- When some students are absent on the day of the exam in class A, dividing the values by the ‘selected data-1’ will make the expected value equal regardless of absents. However, when dividing them merely by the ‘selected data’, the variance will tend to be smaller if there are absentees.

Therefore, in mathematics, we usually use the VAR function when calculating the variance.

We have discussed in full detail until here…

but it is still very confusing. To makes things easier, remember that…

↓Normally we would use this function

‘If there are a lot or an infinite number of data, or if the number of data is not certain, use the VAR function’

**‘If all data is acknowledged and certain, use the VARP function’**

**Diagram example) VAR function**

The VAR and VARP function may be extremely confusing, so if not sure, use the VAR function and select a section of the data and calculate.

]]>

**Companies and schools organizing training courses carried out in a different institute…**

The above situation is common, and when organizing this, someone will have to distribute the employees/students to each group and/or institute. This itself does not seem complicated.

However, there are times when there is a certain capacity of the number of people allowed to attend a certain training course.

Taking employees’/students’ requests into consideration as well as distributing them according to the capacity could be a more complicated task.

To make life easier, here we will explain the method to ‘**automatically distribute according to priority or requests**‘.

○○ inc. has decided to send 7 of their employees into training to different companies.

When deciding on a company to train, the human resources team have decided and carried out the following:

① There are 3 seasons of training, ①~③, and employees must take a training course one time between the 3 seasons in one of the companies.

② Employees filled out a questionnaire and they listed their first, second, and third choice of companies.

③ The human resources team decided on the order of employee priority from 1~7, and will distribute according to the employee priority and their questionnaire. (Employee 1 will be the prioritized first)

④ From A~E, there are 5 companies accepting trainees, and the capacity for each of the 3 seasons is different according to the companies.

Let us now try to create a table and insert formulas to decide on the employees’ training place.

**<Image>**

We will create 2 tables like below to show the results of the questionnaire and the capacity for each company.

① Capacity for each company and season

The capacity for each company A～E in each of the 3 seasons is listed here.

② Results of the questionnaire from employees

The first, second and third choices for each of the 7 employees are listed here, and the employees all have a priority number shown in column D.

(The priority order will be from number 1)

To know the total number of trainees each company is accepting, we added ‘Total’ in column I, and will calculate the sum of F~H.

=SUM(F5:H5)

Below we have added a new section in table ②, and these show the number of available trainees left after distributing the employees to the company of preference according to their priority number.

This is an important step, so we must be careful.

The new columns created are the following:

Column A → 1st choice leftover

Column B → 2nd choice leftover

Column C → 3rd choice leftover

Column F → Company code (Decided)

Column G → Company name (Decided)

The number calculated in columns A～C is a little complicated, so we ill explain in detail below, in (1) and (2).

(1)

・’Employee 001′ selected company ’00AAH003′ as his first choice.

→ Red border

・At this point, the capacity Employee 001’s first choice, company ’00AAH003′ is ‘2’. This is the same number indicated in the original capacity, in I7.

→ Green border

(2)

・Because the 2nd choice of ‘Employee 003′ is ’00AAH003’ and is the same company as the 1st choice of ‘Employee 001’, the remaining capacity in cell B18 (red circle) is 1 subtracted by cell A16 (green circle), which is ‘1’.

Like this, we input the number of remaining capacities beginning from the top priority, but manually typing this one by one is a time-consuming process.

Therefore, let us input a formula as in (3).

(3)-1 Use a formula to show automatically the capacity(=total number of available spots) for each of the companies for the first employee, ‘Employee 001’.

① To show the number of remaining spots for the choices of ‘Employee 001’, we use the VLOOKUP function.

=VLOOKUP(H16,$D$5:$I$9,6,FALSE)

Now the information of remaining spots (total number) will be copied from the table above based on cell H16 (company code for 1st choice).

(3)-2 Do the same with 2nd and 3rd choice.

We use the same formula for the 2nd and 3rd choice, but see that the texts in red differ as they are referring to each the 2nd and 3rd choice of the company.

(4)-1 Display automatically the remaining capacity (=Subtracting the data from the 1st employee from the total) for the 2nd employee, ‘Employee 002’.

① To show the number of remaining spots for the choices of ‘Employee 002’, we first use the VLOOKUP function to calculate the original capacity.

VLOOKUP(H17,$D$5:$I$9,6,FALSE)

Next, if the previous employee(s) selected the same company, we calculate the number of employees that selected that certain company.

COUNTIF($F16:F$16,H17)

Be especially careful of the mixed reference ‘$F16:F$16’.

In ‘$F16:~’, we fix the column but not the row.

If we use Autofill downwards, the formula will change like below:

「 **$F17**:F$16 」

Now for ‘Employee 003’, we can calculate the capacity leftover according to the previous 2 employees, for ‘Employee 004’, the leftover according to the previous 3 employees, and so on.

Lastly, if we subtract the number already selected (COUNTIF) from the total capacity (VLOOKUP), we will get the results.

= VLOOKUP(H17,$D$5:$I$9,6,FALSE) – COUNTIF($F16:F$16,H17)

(4)-2 Do the same with 2nd and 3rd choices.

We use the same formula for the 2nd and 3rd choice, but see that the texts in red differ as they are referring to each the 2nd and 3rd choice of the company.

(5) Use Autofill to show the rest of the results.

Now we are prepared to move on to the next step.

If we input in ‘Company code (Decided)’, the display of number of remaining spots (leftover) in column A~C will change automatically.

We are near to the end. Let us create a formula so that it will automatically classify the company code in the ‘Company code (Decided)’.

① Use the IF function and type the following formula:

=IF(A16>0,H16,IF(B16>0,J16,IF(C16>0,L16,”Full”)))

The meaning of this formula is explained below.

Firstly, the IF function will check if cell A16 (remaining capacity for 1st choice) is more than ‘0 (zero)’. If so, they will get their 1st choice.

*=IF(A16>0,H16*** **,IF(B16>0,J16,IF(C16>0,L16,”Full”)))

If not (if it is ‘0 (zero)’), the IF function will check if cell B16 (remaining capacity for 2nd choice) is more than ‘0 (zero)’. If so, they will get their 2nd choice.

=IF(A16>0,H16 *,IF(B16>0,J16 *,IF(C16>0,L16,”Full”)))

If the 1st and 2nd choice are both ‘0 (zero)’, it will check if cell C16 (remaining capacity for 3rd choice) is more than ‘0 (zero)’. If so, they will get their 3rd choice. If all is ‘0 (zero)’, the text ‘Full’ will appear to show there are no remaining spots for none of their choices.

=IF(A16>0,H16,IF(B16>0,J16 *,IF(C16>0,L16,”Full” *)))

This is the meaning of this long formula. By including 3 IF functions, it calculates in order according to the priority.

Using the same method as finding the company code, let us use the IF function.

① Use the IF function and type the following formula:

=IF(A16>0,I16,IF(B16>0,K16,IF(C16>0,M16,”Full”)))

The formula is the same, but see red text that each is changed from ‘company code’ to ‘company name’.

Lastly, use Autofill so that that all of the results will be displayed.

However, there is one problem.

All the choices Employee 006 are full, and he will not be able to go to any training courses.

Therefore, let us check if there are no remaining spots for other companies.

Like below, let us add another column in table ① and check the remaining capacity for each company.

(1)

① Use the COUNTIF function and type the following formula:

=I5-COUNTIF($F$16:$F$22,D5)

The formula subtracts the companies already full (Count cell D5 from cell range [F16:F22]) from the total capacity (=cell I5).

Use Autofill and drag down until E inc. (=cell J9).

The table is now complete.

For the employee who does not have a training location, we will search for a place by looking at the remaining capacity for each company (Table ① column J) .

Was this helpful?

These cases can occur in many different business situations, so it would be a helpful if we can create tables like this and make data handling easier.

]]>

Data management includes data ‘processing’ and ‘analyzing’ (creating tables and calculating values…), and is a crucial skill in the business world.

When managing data, the method or way of ‘processing’ data becomes important.

There are many ways to process data in Excel and we can achieve the “accurate value” in many different ways, but the problem is that the bigger the data, the more difficult it will become to calculate values or just to “show” it in a simple way.

The ‘**pivot table**‘ can help us manage big data and make it visible and simple.

Knowing this skill will save a lot of our time, so this is a useful and important skill to remember.

Below is an April~June sales report of a computer shop.

Our boss wants to “know the sales amount of each product for each branch”. This sounds like a painstaking task.

In order to use time efficiently, we will use the pivot table to extract and process necessary data.

Follow the steps below to create a pivot table.

(1) Select any cell within the table.

(2) Click on the following:

① Click the [Insert] tab.

② Click ‘PivotTable’ on the left.

(3) When the dialog box opens, insert the following:

① Check in the ‘Table/Range:’ if the automatically selected range is correct.

→ ※If incorrect, use the mouse and highlight the correct range.

② Select ‘New Worksheet’.

→ ※To create the pivot table in the same sheet, select ‘Existing Worksheet’.

③ Click [OK] to complete.

(4) A new sheet will be created automatically, and a pivot table sheet will appear.

Let us now learn the system of the pivot table and how to use it.

(1) System

①【Pivot Table】

An automatically processed table will appear according to the settings on the right.

②【Field list area】

The subjects used as titles in the original table (※such as ‘Date sold’ or ‘Branch’) will appear as “items” here. By dropping (dragging down) the ‘items’ to the areas, or by clicking ON/OFF, we can create the table we want.

③【Report filter area】

The pivot table will be process according to the item dropped here.

④【Column area】

The content of the item dropped here will be the title of each column in the pivot table.

⑤【Row area】

The content of the item dropped here will be the title of each row in the pivot table.

⑥【Value area】

The content of the item dropped here will be the actual data that will be processed in the pivot table.

(2) How to use the pivot table

From the field list area, drop (drag) each item to each of the area below and decide what type of column, row and values to process.

Now that we have revised on how to use the pivot table, we can move on to our main task.

Now, let us actually create a pivot table that shows “the sales amount of each product for each branch”.

(1) Select ‘Branch’ from the field area and drag it to the row area.

(2) The names of the ‘branch’ appears in each row of the pivot table.

(3) Drop the other items like above.

① Drop ‘Product name’ to the columns area.

② Drop ‘Price’ to the values area.

(4) In each column the ‘product name’ appears and the values of the ‘price’ are calculated automatically.

POINT!

If we select an wrong item by accident, we can undue it in 2 ways.

After we created the pivot table, we added 2 more information in the original table. We would like to add these 2 data in the pivot table as well.

**Adding data
**

However, even though we changed the original table, it is not reflected in the pivot table.

**The pivot table
**

In this case, we must change the settings of the pivot table itself.

We will change the data range and show it in the pivot table.

(1) Follow these steps to begin:

① Select ‘PivotTable Tools’→[Analyze].

② Click ‘Change Data Source’ (click on the image).

(2) When the dialog box appears, change the settings.

① Select the correct range in ‘Table/Range:’ by either typing or highlighting.

② Click [OK] to complete.

(3) The data is correctly reflected in the pivot table.

POINT!

Click anywhere on the pivot table to display the ‘PivotTable Tools’.

Other than creating a table that we want, the pivot table function also has the “**pivot graph**“, in which we can create a graph based on the pivot table.

Next we will look at how to create a pivot graph and how to sort it.

Follow the steps below to create a graph out of the pivot table.

(1) Select the following:

① Select ‘PivotTable Tools’→[Analyze].

② Select ‘PivotChart’.

(2) When the dialog box appears, select Clustered Column and click [OK].

(3) A clustered column graph will be automatically created.

The branch names in the graph created is in the same order as the original pivot table, ‘California, Florida, New York, Texas’.

To change the order to for example the grand total (=sales price), we do the following:

(1) Right click on one of the values of the grand total in the pivot table, and select ‘Sort’ → ‘Sort Largest to Smallest’.

(2) The order in the pivot table and the graph changed from largest to smallest.

Like this, if we change the pivot table, the graph will also change.

The table below is the result of dropping ‘sales person’ into the column area and the ‘date sold’ into the row area.

In this case, organizing data not according to date but by month is called ‘**grouping**‘ of pivot tables.

Let us group the dates so that it will show the monthly total.

(1) Right click on the cell with date, and select ‘Group’ from the menu.

(2) When the dialog box appears, select the following:

① Select ‘Months’ from ‘By’.

② Click [OK] to complete.

(3) The pivot table has been reorganized with monthly results (e.g. 4=April).

There are cases where an error will appear when trying to group dates. Below is one example of such.

The table below is the same pivot table as above, but the date display is different.

Let us try to group this and create a monthly sales table.

**Original pivot table
**

When we tried to group the dates in the same way as we did before, this error message popped up.

**Error when trying to group
**

Only dates and numbers can be grouped in pivot tables, so let us look at what field the selected cell is in.

**Original table
**

As we can see above, the cell field is in ‘General’, meaning that it is identified as a text.

When grouping in pivot tables, the above must be in ‘Date’. Even though it looks like a date in the table, the field also must be in date in order to correctly group them in the pivot table.

]]>

To insert a new line in Excel, we can add a text called ‘line feed code = CHAR (10)’. Let us review this line feed code first. → For more information on the CHAR function, click here

Below is a list that shows the address of employees in a company. The result of combining information in column C and D and inserting a new line in between is displayed in column E.

① Combine information in column C and D using the line feed code.

(1) Add “CHAR(10)” when combining cell C4 and D4 with the symbol ‘&’.

=C4& CHAR(10) &D4

If we include the code in between cell C4 and D4, a new line will be inserted after the information in column C, and the information in column D will appear on the 2nd line.

There is an easier way to insert a new line in Excel, which is to push ‘Alt+Enter’. This is a more popular method to insert a new line, but there is an advantage in using the line feed code.

That is, we can easily replace the code with something else, or delete it completely within the formula. This might sound confusing so let us look at an example.

Below is an example of replacing the code with a different text.

(1) Click [Home] → ‘Find & Select’ → ‘Replace’.

(2) Follow the steps below:

① Input text we wish to replace in [Find what:], ‘CHAR(10)’.

② Input text we wish to replace ① with using ” (double quotations) in [Replace with:]. → ” Address:”

③ Click [Replace All] to complete.

(3) With Replace, the ‘line feed code’ has been replaced with the text ‘Address:’. (※We included a space before “Address:” in ②, because we wished to have a space between the postal code and “Address:”)

To delete all the new lines created with the line feed code, follow the example below.

(1) Change the following settings:

① Input text we wish to replace in [Find what:], ‘CHAR(10)’.

② In this case we want to delete the content in ①, so leave [Replace with:] blank.

③ Click [Replace All] and complete.

Lastly, we will look at other examples of texts and symbols that we can use with the CHAR function.

Normally in Excel, the TAB serves as a key to ‘move to the right cell’, so if we we select cell B2 and click on the TAB key, cell C2 will be selected.

This operation itself is useful in many ways, but it cannot serve its common purpose of ‘inserting a space in between the words’ or ‘indenting’.

The CHAR function is useful in this occasion.

Below in column E, we added a space with TAB using the CHAR function.

The TAB in the CHAR function is symbolized as ‘CHAR(9)’, so the formula would be the following:

=C4&CHAR(9)&D4

Now we have successfully added a TAB space in between the information in C4 and D4. However, it is difficult to see the space in Excel.

To make sure there is a TAB space, let us save it in CSV format and check the content in the Notepad.

**When the CSV file is opened in Notepad)**

The part surrounded by the red line is the part we added a TAB space. We can see clearly that there is a space in between the postal code and the rest of the address.

Below is a list of other symbols that we can use with the CHAR function:

Symbols | Displayed in the CHAR function as |
---|---|

! | CHAR(33) |

“ | CHAR(34) |

$ | CHAR(36) |

& | CHAR(38) |

‘ | CHAR(39) |

< | CHAR(60) |

= | CHAR(61) |

> | CHAR(62) |

@ | CHAR(64) |

]]>

In Excel, not only can we keep and calculate data, but we can also create graphs very simply.

Let us look at how to create graphs, starting with the most simple, bar graphs.

The table below shows the number of stationary (HB pencils) sold at each branch store and manufacturer. We will try to create a graph based on this data.

(1) Highlight data to make a graph out of. Include column title (manufacturers) and row title (branch area).

(2) Click the ‘Insert’ tab on the top left, and select the graph button shown below (※Bar graph button).

(3) Click on the top left graph type. The graph will be created and displayed automatically.

(※Drag (do not click) the cursor to the graph types and we can see samples of that graph)

The graph created will have the title ‘Chart Title’. To change the title, follow the steps below.

(1) Click on the word ‘Chart Title’ and type title of preference.

（2）The title has been successfully changed.

Now Let us add an axis title to make it clear what the numbers represent.

(1) Add a vertical axis title as follows:

① Click on graph, and select [Chart Tools] – ‘Design’.

② Select the following:

[**Add Chart Element**] on upper left → [**Axis Titles**] → [**Primary Vertical**]

A label called ‘Axis Title’ should appear on the left side of the graph.

(1) To change the title of the vertical axis, click on the axis just added.

(2) Type ‘Number of pencils’.

We can rotate the axis title. We do not rotate axis titles usually, but here we will look at 2 types of rotation as examples.

(1) Begin formatting the axis title with the following steps:

① Click on the vertical axis.

② Select [Chart Tools] – ‘Format’.

③ Select ‘Format Selection’.

(2) “Format Axis Title” will appear on the right hand side of Excel, so rotate the axis title with the following steps:

① Click on ‘Text Options’.

② Click on the right (‘Text Box’) from the 3 diagrams.

(3) Click on the opposite triangle▼ from [Text direction] and choose ‘Stacked’ or ‘Horizontal’.

(4) Check to see if the direction of the axis title is changed.

The graph created above shows ‘the number of pencils sold for each branch **based on each manufacturer**‘. Let us try to change this so the graph will show ‘the number of pencils sold **based on each branch**‘. The difference is how we look at the original table, based on ‘column’ or ‘row’. We call this ‘**Switching rows/columns**‘ in Excel.

(1) Click on graph, and select [Chart Tools] – ‘Design’. Select ‘Switch Row/Column’.

(2) The ‘row and column’ of the graph has been changed and the graph is now based on each branch.

If we realize after creating a graph that a certain piece of data is unnecessary or would like to add data, we can select the necessary range of data without having to undue everything and start from scratch.

It seems that data of Idaho branch is no longer necessary. Let us try to take that part off from the graph.

(1) Click on graph, and select [Chart Tools] – ‘Design’. Select ‘Select Data’.

(2) When the dialog box appears, follow the steps below:

① Click on the open space in [Chart data range], and highlight range that excludes Idaho branch, cell range [B3:F6] using a mouse.

② Click [OK] to complete.

(3) The graph no longer has the information from Idaho branch.

Let us now add ‘grid lines’ to our graph.

(1) We can add a minor grid line with the following steps:

① Click on graph, and select [Chart Tools] – ‘Design’.

② Select the following from the menu:

Select **[Add Chart Element**] → [**Gridlines**] → [**Primary Minor Horizontal**].

(2) The grid lines have been added, allowing us to evaluate the graph in more detail.

We can easily remove the grid lines by following the steps below.

(1) Click on graph, and select [Chart Tools] – ‘Format’.

→ Select ‘Vertical (Value) Axis Minor Gridlines’ from the opposite triangle▼.

(2) With step (1) the minor grid line has been selected, so press [DELETE] on keyboard to delete.

(※This applies to other graph factors as well)

The graph grid line is now set up as ‘a line for every 50 (pencils) and the maximum as 500 (pencils)’. We can change this easily.

(1) Click on graph, and select [Chart Tools] – ‘Format’.

→ Select ‘Vertical (Value) Axis’ from the opposite triangle ▼.

(2) Click ‘Format Selection’.

(3) From ‘Format Axis’, change the following settings:

Example)

Minimum → 0.0

Maximum → 600.0

Major → 100.0

Minor → 50.0

(4) As set up in (3), the grid line width is now 100, maximum is 600, and the minor grid line is 50.

The graph result might be too complicated when data itself is complex and has a lot of information.

One of the examples for this is when the values are too separated.

We added the total in the table below. Let us create a graph based on this data.

**Outcome of graph)**

Because the values for the total are too big, the graph has been merged and is difficult to see.

Furthermore, displaying the total value next to each of the manufacturers seems odd as well.

To make this graph more pleasant to see, we will show the values of the ‘total’ on the right grid line, and will change the graph type to a ‘line graph’. We call this a ‘combination chart’ in Excel.

(1) Click on the bars of the ‘total’.

(2) Select [Chart Tools] – ‘Format’. Select ‘Format Selection’.

(3) From ‘Format Data Series’, select ‘Secondary Axis’.

(4) Check that there are 2 axis on each side of the graph. The total value now is referred to the right axis.

The bars of the ‘total’ is overlapped, and we cannot see the other bars.

Therefore, now we will change only the data of the ‘total’ to a line graph.

(1) Click on the bar of the ‘total’.

(2) Select the diagram shown below (※line graph) from the ‘Insert’ tab.

(3) Choose the upper left graph.

(4) Only the values of the ‘total’ is now a line graph, and the combination chart now looks much better.

]]>

The table below shows the number of employees in each office.

In each region, there is a department that supervises the offices (branches) named the ‘supervisory’ department.

Calculate the number of employees in the ‘supervisory’ department.

The total number of employees in this list (cell D24) is already calculated for you. (Displayed in blue writing.)

Even though we do not know what function to use, it will not be a problem if we can find the correct function by searching the internet. Therefore, learning how to type the relevant keywords in the search engine is important. Other than using the search box in this website, search engines such as Google and Yahoo! can be helpful. In this case, keywords like below will lead us to get what we wish for, so when having trouble, use the internet.

Below is the answer to practice question 1.

※The answer (number of employees from ‘Supervisory’) is in red.

【Cell】 【Formula】【Value】

D19 ： =SUMIF(C7:C19,”Supervisory”,D7:D19)⇒ 18

【Cell】 【Formula】【Value】

D21 ： =SUM(D7:D19) ⇒ 294

※The formula in blue is only for reference. This is not the main topic in this section.

To calculate the sum for cells that meet a specific condition, we use the SUMIF function.

=SUMIF(range, criteria, [sum_range])

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

Like the diagram below, the function will search within the [range] (between cells C7~C19) for cells that meet the

[criteria] (The office name to be ‘Supervisory’), and will pick out the significant cells from the

[sum_range] (cells D7~D19) and sum up cells D7, D12 and D15.

The number of employees in the ‘Supervisory’ department is ‘18‘ people.

**【Reference】Be careful that the [range] in the SUMIFS formula does not shift!**

The position of the [range] and [sum_range] is extremely important when using the SUMIF function.

Select the same row like the diagram below.

Below is the same table, but the columns and rows are switched.

In this case, make sure that the columns match.

**Example of a range selectetion error**

When using the SUMIF function, if the [range] and the [sum_range] is not in the correct position (correct row or column) like below in the green box,

it will pick up the cells that meet the condition and sum up the values in the relative position which will lead to an incorrect result.

Even if the function seems to show no error, the results might be different from what you expect, so make sure that the [range] and the [sum_range] match with each other.

To calculate the sum of cells that meet a specified condition, we use the SUMIF function.

=SUMIF(range, criteria, [sum_range])

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

The function that we used for this practice question is explained in detail in the following link.

Feel free to check and revise with our website.

Describing the SUMIF function.

The table below shows the number of employees in each office.

Calculate the number of employees working in a ‘branch’.

The total number of employees in this list (cell D19) is already calculated for you. (Displayed in blue writing).

Even though we do not know what function to use, it will not be a problem if we can find the correct function by searching the internet. Therefore, learning how to type the relevant keywords in the search engine is important. Other than using the search box in this website, search engines such as Google and Yahoo! can be helpful. In this case, keywords like below will lead us to get what we wish for, so when having trouble, use the internet.

Below is the answer to practice question 2.

※The answer (number of employees from a ‘branch’) is in red.

【Cell】 【Formula】 【Value】

D19 ： =SUMIF(B7:B16,”*branch*”,D7:D16) ⇒ 230

【Cell】 【Formula】【Value】

D21 ： =SUM(D7:D16) ⇒ 276

※The formula in blue is only for reference. This is not the main topic in this section.

To calculate the sum for cells that meet a specific condition, we use the SUMIF function.

=SUMIF(range, criteria, [sum_range])

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

Like the diagram below, the function will search within the [range] (between cells C7~C16) for cells that meet the

[criteria] (includes the word ‘branch’ in location name), and will pick out the significant cells from the

[sum_range] (between cells D7~D16) and sum up cells D7, and D12~D15.

The number of employees working in a ‘branch’ is ‘230‘ people.

**【Reference】How to use the wildcard character ‘*’.**

In this question we wanted to find location names that have the word ‘branch’ in them.

For this, ‘wildcard characters’ become useful.

What is a wildcard character?

Wildcard characters are useful to search for words which include the specified character, by adding it in the front, the back, or both front and back.

Symbol | Definition |
---|---|

* | Allows more than one character |

? | Allows one character |

How to use the wildcard character

When you want to find cells with a specific word like ‘any word + branch + any word’ , we use the ‘*’ symbol. →”*branch*”

**=SUMIFS(D7:D16,B7:B16,“*branch*”,C7:C16)
**

**To count the number of cells which include a certain character or word, we use * as the arbitrary character.**

Example) To find cells with the word ‘branch’:

When ‘branch’ comes in the beginning Example) Branch office |
=SUMIF(range,”branch*,”[sum_range]) |

When ‘branch’ comes in between Example) Texas branch office |
=SUMIF(range,”*branch*,”[sum_range]) |

When ‘branch’ comes in the end Example) Utah branch |
=SUMIF(range,”*branch,”[sum_range]) |

To calculate the sum for cells that meet a specific condition, we use the SUMIF function.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

The function that we used for this practice question is explained in detail in the following link.

Feel free to check and revise with our website.

Describing the SUMIF function using the wildcard specifying ‘including ~’.

The table below shows the number of employees in each office.

Calculate the number of employees that do not work in a ‘service office’.

The total number of employees in this list (cell D19) is already calculated for you. (Displayed in blue handwriting).

▶Download data in Excel

Even though we do not know what function to use, it will not be a problem if we can find the correct function by searching the internet. Therefore, learning how to type the relevant keywords in the search engine is important. Other than using the search box in this website, search engines such as Google and Yahoo! can be helpful. In this case, keywords like below will lead us to get what we wish for, so when having trouble, use the internet.

Below is the answer to practice question 3.

※The answer (number of employees that do not work in a ‘service office’) is in red.

【Cell】 【Formula】 【Value】

D19 ： =SUMIF(C7:C16,”<>*service office”,D7:D16) ⇒ 250

【Cell】 【Formula】【Value】

D21 ： =SUM(D7:D16) ⇒ 276

※The formula in blue is only for reference. This is not the main topic in this section.

To calculate the sum for cells that meet a specific condition, we use the SUMIF function.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

Like the diagram below, this function will search within the [range] (between cells C7~C16) for cells that meet the

[criteria] (does not include the word ‘service office’ in location name), and will pick out the significant cells from the [sum_range] (between cells D7~D16) , and sum up cells D7, D9, D12～D15.

The number of employees that do not work in a ‘branch’ is ‘250‘ people.

**【Reference】The symbols that we can use for search**

Symbols | Definition |
---|---|

< | Smaller than the selected number |

<= | Equal to or smaller than the selected number |

> | Bigger than the selected number |

>= | Equal to or bigger than the selected number |

<> | Not equal to selected number (besides/other than) |

To calculate the sum for cells that meet a specific condition, we use the SUMIF function.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

The function that we used for this practice question is explained in detail in the following link.

Feel free to check and revise with our website.

Describing the SUMIF function and the use of symbols to define ‘not ~’.

The table below shows the number of employees in each office, and if there is a company owned house.

Use the **SUMIF function** and calculate the number of employees in the ‘Supervisory’ department who work in a location that has a company owned house.

(The SUMIF function itself does not have he function to describe multiple conditions. Try to remember what data you need to calculate the above using the SUMIF function.)

The total number of employees in this list (cell D19) is already calculated for you. (Displayed in blue writing).

We cannot apply multiple condition with the SUMIF function. Therefore, we must create a conditional formula outside the function. Create a new column (column F), and use the AND function to create a conditional formula. Then, use the SUMIF function to calculate the number of employees.

Below are the answers to question 4.

※The answers of the number of employees in ‘Supervisory’ and in a location with a company owned house is in red, and

the results for the AND function in column F are in green.

【Cell】 【Function】 【Value】

F7 ： =AND(C7=”Supervisory”,E7=”Yes”) ⇒ TRUE

F8 ： =AND(C8=”Supervisory”,E8=”Yes”) ⇒ FALSE

【The same goes with F9～F14】

F15 ： =AND(C15=”Supervisory”,E15=”Yes”) ⇒ TRUE

F16 ： =AND(C16=”Supervisory”,E16=”Yes”) ⇒ FALSE

【The same goes with F17～F19】

【Cell】 【Function】 【Value】

E24 ： =SUMIF(F7:F19,TRUE,D7:D19) ⇒ 14

There are a few steps to this question.

(1) First of all, the we can not apply multiple conditions with the SUMIF function, so we create a new column (column F) and use the AND function to check if it meets the two conditions.

This time we use the ‘AND function‘.

We use the AND function in a situation where we have two or more conditions and want to know if there are any cells that meet both.

=AND(logical1, logical2, [logical3]…)

[logical1] = Set up the 1st condition.

[logical2] = Set up the 2nd condition.

[logical3…] = Not obligatory. Set up the 3rd condition.

【Reference】For more information on the AND function, click here.

[logical1] = Set up the 1st condition.

[logical2] = Set up the 2nd condition.

[logical3…] = Not obligatory. Set up the 3rd condition.

【Reference】For more information on the AND function, click here.

In this question we want to know the number of employees that are in the ‘Supervisory’ department and that work in locations ‘with a company owned house’.

For each row, we will check if they meet the two conditions using the AND function.

【If it meets all of the conditions】: The AND function will return a ‘TRUE‘.

For this case, if column C is ‘Supervisory’ and if there is a ‘Yes’ in column E, then column F should show a ‘TRUE‘.

Cells F7 and F15 meet the two conditions.

【If it does not meet all of the conditions】 : The AND function will return a ‘FALSE‘.

For this case, if if column C and column F do not meet the conditions, then column F should show a ‘FALSE‘.

Cells F8～F14 and F16～F19 do not meet both conditions.

The diagram below shows an example for cell F8 and F15.

(2) Secondly, we use the SUMIF function and use column F to count the sum of all cells that apply.

We used the AND function to show the word ‘TRUE‘ when both conditions are met,

so in cell E22, we type the formula =SUMIF(F7:F19,TRUE,D7:D19).

The number of employees in the ‘Supervisory’ department and that work in a location with a company owned house is ‘14‘ people.

To calculate the sum of cells that meet a specific condition, we use the SUMIF function.

Like in【Practice question 4】, even though there are multiple conditions we can combine it with other functions and use the SUMIF function without a problem.

[range] = Select cell range to find if it meets condition.

[criteria] = Input condition (number or text).

[sum_range] = Select cell range to find the sum for.

Feel free to check and revise with our website.

Describing the SUMIF function and how to use it for multiple conditions.

Below is a business trip schedule of the Sales manager.

It shows the location of the trip and if the tickets for transportation are arranged.

1. Calculate the number of trips in which the tickets are arranged.

2. Calculate the number of trips in which the tickets are not arranged yet.

Below are the answers to practice question 1.

※The answer for number of trips in which tickets are arranged is in blue, and the number of trips in which tickets are not arranged yet is in red.

【Cell】【Formula】【Value】

D12 ：=COUNTIF(D4:D10,”<>”) ⇒ 2

※As for the above, the formulas listed below are also correct.

In the answer above we are focusing on ‘counting cells that are not empty’.

【Alternate answer 1】D12 =COUNTIF( D4:D10 ,”” & “” )

【Alternate answer 2】D12 =COUNTIF( D4:D10,”Arranged” )

【Cell】【Formula】【Value】

D14 ：=COUNTIF(D4:D10,””) ⇒ 5

Below is the explanation to practice question 1.

To count full cells, we use the COUNTIF function.

=COUNTIF(range, criteria)

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

To count cells that are not empty, we use the symbol <> which indicates ‘besides/other than ~’, and the symbol “” which indicates empty. We combine the two symbols to create the following formula.

Example 1) =COUNTIF( D4:D10 , “<>” & “” )

Example 2) =COUNTIF( D4:D10 , “<>” )

If at least one cell meets a condition, the COUNTIF function will calculate the number of data (cells) that meet the certain condition.

Always add ” (double quotations) to the condition. The example diagram below shows the answer to cell D12.

The example diagram below shows the answer to cell D14.

Remember that the COUNTIF function counts the number of cells that meet a specified condition.

There are a few ways to specify a condition, so begin memorizing the simple ways and move up to the more complicated ways.

=COUNTIF(range, criteria)

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

The function that we used for this practice question is explained in detail in the following link.

Feel free to check and revise with our website.
## Practice question 2/Count cells that meet a condition/Other than ~

### 【Practice question 2 : Question】

*Hints!*
Even though we do not know what function to use, it will not be a problem if we can find the correct function by searching the internet. Therefore, learning how to type the relevant keywords in the search engine is important. Other than using the search box in this website, search engines such as Google and Yahoo! can be helpful. In this case, keywords like below will lead us to get what we wish for, so when having trouble, use the internet.

### 【Practice question 2 : Answer】

### 【Practice question 2 : Explanation】

Feel free to check and revise with our website.

Describing the COUNTIF function/ Count the number of cell that meets a condition (empty・not empty).

Below is a business trip schedule.

Other than the location of the trip and the situation of ticket arrangement, there is a column showing the amount of trip allowance for each trip.

1. Count the number of trips to a ‘branch’.

2. Count the number of trips to a location other than a ‘branch’.

3. Count the number of trips with the amount of trip allowance other than $80.

Below are the answers to practice question 2.

※The answers for the number of trips to a branch is in blue, the number of trips to a location other than a branch is in red, and the number of trips with trip allowance other than $80 is in green.

【Cell】【Formula】【Value】

D12 ：=COUNTIF(C4:C10,”*branch”) ⇒ 4

【Cell】【Formula】【Value】

D14 ：=COUNTIF(C4:C10,”<>*branch”) ⇒ 3

【Cell】【Formula】【Value】

D16 ：=COUNTIF(E4:E10,”<>80″) ⇒ 5

Below are the explanations to practice question 2.

We can also use the COUNTIF function to count cells with a specific text in them.

=COUNTIF(range, criteria)

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

(a) Count the number of trips to a ‘branch’.

(1) [range] : Highlight cell range with the ‘locations’, cell range [C4:C10].

(2) [criteria] : To count the number of cells which include a certain text like ‘a word + branch’ , we use * as the arbitrary character. → “*branch”

=COUNTIF(C4:C10,”*branch”)

(b) Count the number of trips to a location other than a ‘branch’.

(1) [range] : Highlight cell range with the ‘locations’, cell range [C4:C10].

(2) [criteria] : To include a condition defining ‘besides/other than ~’, we use the symbol <>. → “<>*branch”

=COUNTIF(C4:C10,”<>*branch”)

**To count the number of cells which include a certain character or word, we use * as the arbitrary character.**

Example) To find cells that include the word ‘pen’

When ‘pen’ comes in front Examples) pen stand, pen holder, etc. |
=COUNTIF(range,”pen*“) |

When ‘pen’ comes in between. Examples) color pen set, brush pen lettering |
=COUNTIF(range,”*pen*“) |

When ‘pen’ comes in the end. Examples) ballpoint pen, fountain pen, etc. |
=COUNTIF(range,”*pen“) |

(c) Count the number of trips with trip allowance other than $80.

(1) [range] : Highlight cell range with the ‘trip allowances ($)’, cell range [E4:E10].

(2) [criteria] : To include a condition defining ‘besides/other than ~’, we use the symbol <>. → “<>80”

=COUNTIF(E4:E10,”<>80”)

We count the number of cells using the COUNTIF function.

There are 4 trips to a ‘branch’,

3 trips to a location other than a ‘branch’, and

5 trips with a trip allowance other than $’80.00′.

Remember that the COUNTIF function counts the number of cells that meet a specified condition.

There are a few ways to specify a condition, so begin memorizing the simple ways and move up to the more complicated ways.

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

Feel free to check and revise with our website.

Describing the COUNTIF function/ Count the number of cell that meets a condition (spaces・not empty).

Below is a product master data.

The shop is considering a change in price for some products and is renewing this master data.

Please check if there is no duplication in this data.

Below are the answers to practice question 3.

※The answers are in red.

※We will explain “$” that symbolizes absolute cell reference in the explanation.

【Cell】【Formula】【Value】

D4 ：=COUNTIF($B$4:$B$18,B4) ⇒ 1

D5 ：=COUNTIF($B$4:$B$18,B5) ⇒ 1

：

【Same with D6~D16…】

：

D17 ：=COUNTIF($B$4:$B$18,B17) ⇒ 1

D18 ：=COUNTIF($B$4:$B$18,B18) ⇒ 2

Checking duplication in a data

Duplication check helps us to check when there are 2 or more of the exact same word or text in a data.

To search for duplication in data,

we use the COUNTIF function.

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

The correct formula for this practice question is shown below.

(1) [range] : Highlight cell range with product names, cell range [$B$4:$B$18].

For this case we use the ‘absolute cell reference’ that fixes a specific cell within the selected [range].

We copy the content written in cell D4 by dragging it down (keep on clicking left on mouse when dragging down) to cell D5~D18.

We use the symbol ‘$’ to define an absolute cell reference.

【Reference】For more information on absolute cell reference, click here

Why do we need the symbol ‘$’?

If we write the formula in cell D4 like this ” =COUNTIF(B4:B18,B4) ” without absolute cell reference,

once we drag down the formula until cell D

the selected cell range (B4:B18) will shift a row each. We want to keep the selected cell range fixed.

(2) [criteria] : We want to check for duplication, so here we must select a cell that has the word/text we wish to check.

If the results show the value of 2 or more, then it means that there are more than one of that specific content.

To check for duplication, we write the function as below:

In the case of cell D4 → =COUNTIF($B$4:$B$18,B4)

If the results show the value of 2 or more, then it means that there are more than one of that specific content.

To check for duplication, we write the function as below:

In the case of cell D4 → =COUNTIF($B$4:$B$18,B4)

We will now count how many duplicates there are in the data.

Pink : There is only 1 ‘Calculator (12 digits)’ within the cell range surrounded in red borders. No duplication.

Blue : There are 2 ‘Mechanical pencil’. Duplication.

Green : There are 2 ‘Colored pencils 24-count’. Duplication.

Pink : There is only 1 ‘Calculator (12 digits)’ within the cell range surrounded in red borders. No duplication.

Blue : There are 2 ‘Mechanical pencil’. Duplication.

Green : There are 2 ‘Colored pencils 24-count’. Duplication.

Remember that the COUNTIF function counts the number of cells that meet a specified condition.

There are a few ways to specify a condition, so begin memorizing the simple ways and move up to the more complicated ways. We can use the COUNTIF function to search for empty and full cells, a certain text, or duplication.

[range] = Select the corresponding range in calculating the number of cells.

[criteria] = Input the condition using ” (double quotations).

Feel free to check and revise with our website.

Describing the COUNTIF function/ Check for duplication.

To calculate the average/mean for data in Excel, we use the AVERAGE function.

=AVERAGE(number1, [number2]…)

**[number1] = Identify the 1st number or cell range to calculate the average for.
[number2] = Not obligatory. Identify when there is a number or cell range other than [number1].
**

Definition of function | A function to calculate the average of a selected number or cell range. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

The table below shows the heights of students in a kindergarten. Let us calculate the ‘average height’ in cell E13.

① Calculate the ‘average height’ from all the heights.

(1) [number1] ：Highlight cell range [E4:E11].

=AVERAGE(E4:E11)

To add a condition in calculating the average, we use the AVERAGEIF function.

=AVERAGEIF(range, criteria, [average_range])

**[range] = Identify the cell range to see if it meets condition.
[criteria] = Input a condition using a numerical value or formula to search in [range].
[average_range] = Identify the actual cell range to find the average for.
**

Definition of function | A function to calculate the average for data which meets a specified condition. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

Using the same table, let us now calculate the average height of students from ‘**class A**‘.

① Calculate the ‘average height for class A’ from all the heights.

(1) [range] : Highlight cell range [C4:C11].

(2) [criteria] : Surround the condition class ‘A’ with ” (double quotations). → “A”

(3) [average_range] : Highlight cell range to calculate the average, cell range [E4:E11].

=AVERAGEIF(C4:C11,”A”,E4:E11)

POINT!

When the average is calculated, due to the fact that it cannot be fully divided sometimes the result will be displayed long, like ‘123.4567’.

In this case, select the specific cell and click on the [decimal] button under the [Home] ribbon. With the button we can easily increase and decrease the number of decimal units.

To specify multiple conditions in calculating the average, we use the AVERAGEIFS function.

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2], [criteria2]…)

**[average_range] = Identify the actual cell range to find the average for.
[criteria_range1] = Identify the 1st cell range to search if it meets condition.
[criteria1] = Input a condition using a numerical value or formula to search in [criteria_range1].
[criteria_range2] = Not obligatory. Identify the 2nd cell range to see if it meets condition.
[criteria2] = Not obligatory. Input a condition using a numerical value or formula to search in [criteria_range2].
**

Definition of function | A function to calculate the average for data which meets multiple conditions. |
---|---|

EXCEL version | Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

Using the same table, let us now calculate the average height of ‘**boys**‘ from ‘**class A**‘.

① Calculate the average height of ‘boys from class A’.

(1) [average_range] : Highlight cell range [E4:E11].

(2) [criteria_range1] : Highlight 1st cell range to see if it meets condition, cell range [C4:C11].

(3) [crieria1] : Surround the condition class ‘A’ with ” (double quotations). → “A”

(4) [criteria_range2] : Highlight 2nd cell range to see if it meets condition, cell range [D4:D11].

(5) [criteria2] : Surround the condition ‘Boy’ with ” (double quotations).→ “Boy”

=AVERAGEIFS(E4:E11,C4:C11,”A”,D4:D11,”Boy”)

These functions to calculate the average is useful, but we must be careful as “**if there is a ‘0’ within the cell range, it will be included when calculating the average**“.

Check below for an example.

In the table below, Tim, the 2nd student on the table was absent on the day of the medical check up. Therefore, we typed a ‘0 (zero)’ as his height temporarily.

When we calculated the average height in cell E13, while there are more heights over 110cm, the result came out as ‘101.8’.

This is because the ‘0 (zero)’ was also included when calculating the average height.

Instead of typing a ‘0 (zero)’, if we keep the cell empty, the average height will be calculated correctly.

Furthermore, characters like ‘-‘ also do not affect the calculation of average. When there are cells that we ‘cannot input’, we can either keep the cell empty or type characters like ‘-‘.

We have explained earlier that if there is a ‘0 (zero)’ in the cell range, it will be included when calculating the average, so we should keep the cell empty or input characters other than numerical values. However, there might be times when we must input ‘0’. Let us look at how to exclude 0 (zero) when calculating the average.

As before, a ‘0 (zero)’ is typed in the height column of the student absent for the medical check up. Let us try to calculate the average height correctly with this data.

① Calculate the ‘average height’ from all the heights.

(1) Calculate the sum for cell range [E4:E11].

SUM(E4:E11)

(2) Count the number of values other than ‘0 (zero)’ within cell range [E4:E11].

COUNTIF(E4:E11,”<>0″)

(3) Divide the sum calculated in (1) by the number of values other than ‘0 (zero)’ calculated in (2).

= SUM(E4:E11) / COUNTIF(E4:E11,”<>0″)

Now we have successfully calculated the average, excluding the value ‘0 (zero)’. Remember that we do not necessarily always need to use the AVERAGE function when calculating the average.

When calculating the average under multiple conditions, we can also use the DAVERAGE function. This function will identify the whole table including the title row as a ‘database’ and as a result, it can for example “extract the necessary information from the column with the title ‘Gender’…”.

=DAVERAGE(database, field, criteria)

**[database] = 列の見出し部分も含めた表の範囲を指定します。
[field] = 平均を求めたい見出しを指定します。
[criteria] = 検索条件が入力された範囲を指定します。
**

Definition of function | A function to calculate the average of the ‘field’ that meets a condition. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

In the same table, we added a condition section on the right. We will calculate the average height of all heights that meet the conditions.

① Calculate the average height according to the condition on the right (in class A and a boy).

(1) [database] : Highlight cell range [B3:E11] including the title row.

(2) [field] : Surround the title column to find the average for with ” (double quotations). → “Height (cm)”

(3) [criteria] : Select cell range with condition, cell range [G3:H4]. (※Include the title row as well).

=DAVERAGE(B3:E11,”Height (cm)”,G3:H4)

We have successfully calculated the average height for ‘boys from class A’.

As the DAVERAGE function identifies the whole table as a ‘database’ including the titles, we can reflect the conditions by typing them near the table (in the case above, columns G and H). The advantage in using this function is that it is much easier to change the conditions.

]]>

When using the IF function, we sometimes want to include complicated conditions such as ‘**greater than…**‘ or **‘smaller than or equal to…’**. Let us see how we can define these conditions correctly in the formula.

Below are the results of evaluations carried out by the Human Resources department. We would like to use the IF function to create a condition where ‘if the evaluation score is more than 350 points, display a “pass”‘ and if not, ‘a “fail”‘.

We will explain below how to include the comparison operator (greater than or equal to~) in the formula of the IF function.

In Mathematics we express it like ‘**D4≧350**‘, but in Excel, we begin with the ‘= (equal)’ sign.

We express ‘smaller than or equal to…’ like ‘D4<=350’.

Below is a list of comparison operators that we use often:

**【Symbols of equality and inequality】**

Symbol | Definition |
---|---|

< | Smaller than the selected number |

<= | Equal to or smaller than the selected number |

> | Bigger than the selected number |

>= | Equal to or bigger than the selected number |

<> | Not equal to selected number (besides/other than) |

= | Equal to selected number |

Other than comparison operators, we might want to use ‘*’ and ‘?’ to define cases such as ‘including the text/word …’.

For example, ‘if the corresponding word is included in the beginning’, input ‘○○*’, and ‘if there is 1 different letter in the corresponding word’, we can input ‘○○?○○’.

This year, a company has decided to provide a summer bonus for only the Sales department. Therefore, in column D, they have created the table below to show which employees can get the summer bonus. If the employee ‘is a member of the Sales department, display a ○ and if not, a ×’.

The COUNTIF function that we included in the IF function states to count if the text in cell B4 begins with ‘Sales’.

In Excel, the ‘~’ part is defined with the ‘*** (Asterisk)**‘ and in this case, no matter what word follows, it will count all words/phrases including ‘Sales’.

The ‘**? (Question mark)**‘ allows us to define 1 anonymous letter, so for this case we can write ‘Sales, division ?’.

**【Wildcard character symbols】**

Symbol | Definition |
---|---|

* | Allows more than one anonymous character |

? | Allows one anonymous character |

When typing formulas and texts, there might be times when we ‘want to set a condition to start a new line with a formula…’ or ‘want to include a symbol we do not know the name for…’.

The CHAR function might be useful in these occasions.

The CHAR function can change text codes in Excel (※All words each have a number assigned) to a text that supports ASCII. Furthermore, by using the CHAR function we can start a new line wherever we wish when merging texts.

The ASCII code is a coding system in the computer that codes texts and symbols. By using the codes, we can display the corresponding text or symbol.

=CHAR(number)

**[number] = Select ASCII number wished to be displayed.**

Definition of function | Display the text or symbol according to the selected code. |
---|---|

EXCEL version | Excel2003・Excel2007 ・ Excel2010 ・ Excel2013 ・ Excel2016 |

Below are examples of decoding. There are a lot more codes other than below, so it might be entertaining to look at other codes.

① Decode the values in column B

[number] ： Select cell with code, B4.

=CHAR(B4)

This might not be a function we use often, but for example, when we combine 2 or more texts together, it can ‘start a new line within the cell’ for us.

※When using this operation, we must complete steps (1)~(2) beforehand.

(1) Right click on cell to start a new line and select ‘Format Cells’.

(2) When the dialog box appears, do the following:

① Click ‘Alignment’.

② Check ‘Wrap text’.

③ Click [OK] to complete.

(3) Use the code to start a new line when combining.

The table below shows employee information of a company. In column E, the ‘Zip code’ and the ‘Address’ are combined with a formula using the symbol ‘&’.

Let us see how we can use the CHAR function here to start a new line after the Zip code.

① Combine column C and D together, and start a new line after the information in column C.

[number] ： Select ’10’ that is the code for starting a new line and add it in the original formula “C4&D4“.

=C4& CHAR(10) &D4

To compare cells in date format, we can use the DATE function within the formula with the IF function. →For more information on the DATE function, click here

The table below is a membership list of a DVD rental shop. The card type has been changed from April 1 2015 so they have decided to notify members that became members before that date.

① Use the DATE function to display ‘Notify’ when date is before column C (membership date) and if not, ‘OK’.

(1) Select ‘April 1 2015’ in the DATE function.

=DATE（2015,4,1）

(2) Compare with cell C4 (in date form) using the IF function.

=IF(C4<DATE(2015,4,1),”Notify”,”OK”)

Column C in the table below is not in date form but in text form (Excel does not identify it as a date).

In this case, use the TEXT function and DATEVALUE function to first convert into date. →For more information on TEXT/DATEVALUE function, click here

① Convert dates from text form to date form, and display ‘Notify’ when date is before column C and if not, ‘OK’.

(1) Change the display of cell C4 using the TEXT function.

TEXT(C4,”0000!/00!/00″)

(2) Convert the date from text to date form using the DATEVALUE function.

DATEVALUE( TEXT(C4,”0000!/00!/00″) )

(3) Compare with date selected in the DATE function (April 1 2015) using the IF function.

=IF( DATEVALUE(TEXT(C4,”0000!/00!/00″)) <DATE(2015,4,1),”Notify”,”OK”)

]]>

Here we will explain about the addition/subtraction of ‘dates’ and ‘times’, something we often use in Excel.

The list below shows members’ information for a video rental shop. The expiry date for membership is 1 year, and 2 weeks prior to that date, a notice is sent to the members to encourage them to renew their membership.

In column E, we will set up a formula that will display the date of sending the notices.

① Subtract 2 weeks from expiry date.

We subtract ’14’ (2 weeks) from the expiry date.

=D4-14

We can also set up formulas like these with addition.

The table below shows the arrival time of 4 students when they rush from their house to school.

Here, we will calculate ①the time difference between sunny and rainy days, and ②the arrival time on a sunny day without the 2 minutes of waiting for railroad crossing.

① Subtract arrival time of sunny days from rainy days.

We subtract ‘Sunny’ from the bigger number, ‘Rainy’.

(※We cannot subtract time from a smaller number than the other)

=C4-D4

② Subtract waiting time for railroad crossing (2 minutes) from arrival time of sunny days.

To calculate time such as ‘add ~ hours’ or ‘subtract ~ minutes’, we express it in the following way.

1 hour → 1:00

10 minutes → 0:10

Therefore, to ‘subtract 2 minutes’, we input ‘0:02’ and surround it with ” (double quotations).

=D4-“0:02”

Below is a company’s task schedule. When the task is done, ‘Completed’ will be manually typed in column D.

We will compare ‘Today’s date’ with ‘Deadline’ and set up a formula in column E to display the following:

If completed, ‘As planned’

If today’s date is past deadline, ‘Late’

If deadline is ahead, leave blank

① Change the display in ‘Timing’ according to today’s date and deadline.

(1) If cell E2 ‘Today’s date’ is bigger (more current) than cell C5 ‘Deadline’, follow condition (2) and if not, leave blank.

=IF(E2>C5, (2) ,””)

(2) If cell D5 is ‘Completed’, display ‘As planned’ and if not, ‘Late’.

IF(D5<>”Completed”,”Late”,”As planned”)

(3) Combine formulas (1) and (2).

=IF(E2>C5,IF(D5<>”Completed”,”Late”,”As planned”),””)

To count the days until the end of month, first we must calculate the last day of the month.

=EOMONTH(start_date, months)

**[start_date] = Select cell with date.
[months] = Identify month counting from [start_date]. (※If same month, input ‘0’)
**

Definition of function | A function that displays the last day of the month counting the [months] from the [start_date]. |
---|---|

EXCEL version | Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

Using the same task schedule, we will calculate the last day of month in cell C14 and days until last day of month in cell E14.

① Calculate payment date (last day of the month).

Select cell E2 for the [start_date] and input ‘0’ implying this month for the EOMONTH function.

=EOMONTH(E2,0)

② Calculate the days until payment with subtraction.

Subtract cell E2 ‘Today’s date’ from cell C14 ‘Payment date’.

=C14-E2

To manually type and update current date for every task is time consuming.

There is a function that updates the date and time automatically every time we open Excel. Here we will explain that function along with other functions that are relevant in calculating date and time.

=NOW()

**※No need to identify an argument for this function.**

Definition of function | A function to display the current date and time. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=TODAY()

**※No need to identify an argument for this function.**

Definition of function | A function to display current date. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=YEAR(serial_number)

**[serial_number] = Select cell with date. (※Must be in a ‘date’ cell format)**

Definition of function | A function that converts the [serial_number] to a year. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=MONTH(serial_number)

**[serial_number] = Select cell with date. (※Must be in a ‘date’ cell format)**

Definition of function | A function that converts the [serial_number] to a month. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=DAY(serial_number)

**[serial_number] = Select cell with date. (※Must be in a ‘date’ cell format)**

Definition of function | A function that converts the [serial_number] to a day. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=DATE(year, month, day)

**[year] = Select cell with year.
[month] = Select cell with month.
[day] = Select cell with day.
**

Definition of function | A function that combines [year], [month] and [day] and converts it to a ‘date’ cell format. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

A serial number is used in Excel to express time.

Usually it is a value that “has a ‘date’ cell format”.

① Display current date automatically.

There is no need to input an argument. The date is updated/renewed every time Excel is opened.

=TODAY()

② Display current date and time automatically.

There is no need to input an argument. The date is updated/renewed every time Excel is opened.

=NOW()

③ Display only the ‘year’ from cell with date.

Select cell with date, E4.

=YEAR(E4)

④ Display only the ‘month’ from cell with date.

Select cell with date, E4.

=MONTH(E4)

⑤ Display only the ‘day’ from cell with date.

Select cell with date, E4.

=DAY(E4)

⑥ Combine ‘year’ ‘month’ and ‘day’ and convert result to a ‘date’ cell format.

Select cell D8 for ‘year’, cell F8 for ‘month’, and cell H8 for ‘day’.

=DATE(D8,F8,H8)

We can use the ‘shortcut key’ to simply display the current date and time without using functions.

→ For more information on shortcuts, click here

Sometimes we might want to calculate time exceeding 24 hours, like calculating work hours for the month. To do this, there are points we must be aware of.

The table below shows the work hours in a month of an employee.

In cell C12, we set up a formula using the SUM function to calculate the total of cell range [C4:C11].

=SUM(C4:C11)

However, the results shows that the employee only worked for ’14:00′, meaning 14 hours, which is incorrect. This is in fact because Excel’s cell format is in a setting where it does not display time exceeding 24 hours. Therefore, we must change its setting.

Below are the steps to change the setting for display.

(1) Right click on cell needed to be corrected, and choose ‘Format cells’ from tab.

(2) From the dialog box ‘Format cells’, follow the steps below.

① From the [Category], choose ‘Custom’.

② Input or choose ‘[h]:mm’ from [Custom] in category.

③ Click the OK button.

（3） Results after changing the setting

Lastly, there might be times when we would like to “display this date as a text”, or “display this text as a date”.

Using the ‘format cells’ tab is one way, but there is a function that can do this conversion as well.

=TEXT(value, format_text)

**[value] = Select cell with value (‘date’ cell format).
[format_text] = Input display format such as “yy/mm/dd” or “#,##0” as in the ‘Category’ in ‘Format cells’.**

Definition of function | A function that converts value to a specified text. |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

=DATEVALUE(date_text)

**[date_text] = Select cell with text (‘date’ cell format).
**

Definition of function | A function that converts text to a serial number (‘date’ cell format). |
---|---|

EXCEL version | Excel2003 ・ Excel2007 ・ Excel2010 ・ Excel2013・ Excel2016 |

① Display cell with date as a text.

For [value] in the TEXT function, select cell with date (‘date’ cell format), B4. For [format_text], input ‘yyyy.m.d’ and surround it with ” (double quotations).

=TEXT(B4,”yyyy.m.d”)

**※The results will be categorized as a ‘text’ by Excel.**

② Display cell with text (date) as a serial number (‘date’ cell format).

(1) For [value] in the TEXT function, select cell with text (date), D4. For [format_text], input ‘0000!/00!/00’ and surround it with ” (double quotations). First we change the display of this value using ‘/’.

TEXT(D4,”0000!/00!/00″)

(2) Input the formula in (1) to the DATEVALUE function and convert value to serial numbers (‘date’ cell format).

=DATEVALUE(TEXT(D4,”0000!/00!/00″))

**※The results will be categorized as a ‘date’ by Excel.**

]]>