Lesson 5 Microsoft Excel Part 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

How to do addition in Excel

One of the typical day-to-day operations performed in Excel is addition. Whether you have to
find the sum of the price list, expense sheet, and calculate the total sales or any other action. You
can even create your customized SUM formulas by combining the SUM function with other Excel
functions.

1. Sum a column in Excel with one click

a. Click on the column alphabet for which you want to find out the sum.
b. At the Excel Status bar, you will notice the total of the cells.

c. You can also select a few cells to calculate the sum. It will quickly display the sum of
the selected cells in the Excel status bar.

Hold and Drag


2. Calculate the sum in Excel with AutoSum

The second method down in your list is AutoSum. This method allows the user to quickly sum up
a column and hold the output in the table. The advantage of using the AutoSum method is that
it automatically adds up the numbers and will present the result in the specified cell. To apply
this method, follow the below steps.

a. Click on the empty cell below the column where you want to sum up the numbers.

Select the cell where you


want to sum the numbers

b. Go to the Home tab > Editing group > AutoSum option.

c. Excel will automatically pick the range and will put the same in the SUM function.
Though if needed, you can alter the range as well.
d. Click on the Enter button on your keyboard, and you will notice Excel will immediately
give you the sum of the numbers present in the selected range. As you can see, the
formula is used for the details rather than the exact number.

3. Addition using the SUM function

One of the easy methods commonly used to find the total in Excel is the SUM function. The SUM
function is used to select specific cells or even a large range in an Excel worksheet and calculate
their total. This method is beneficial if you have a large excel column and want to calculate the
sum without highlighting the range. Though, you still need to enter the SUM function manually.
To apply this method, follow the below steps.

a. Click on the empty cell below the column where you want to sum up the numbers.

b. Start the formula with equal to (=) followed by SUM (). In the arguments select the
range of the cells by pointing your mouse to one cell and dragging the cursor to the
end. If you want you can directly enter the number of cell references separated by
comma.
Note: You can also manually type the SUM range address. It is helpful to calculate
large range data easily. For example =SUM(B2:B1000).

c. Press the Enter button and Excel will immediately calculate the sum of numbers.

Output

4. Find Sum of only visible cells

We've discussed regarding how SUM functions sum together all the values. As a result, using this
strategy, we may learn how to compute the total simply for the cells that are visible. Hence,
leaving out the cells that were filtered or hidden. Follow the procedures listed below to
implement this approach.
a. Enter your data in Excel spreadsheet.

b. Now, we will filter the above dataset and fetch only the values that are greater than
85. Click on header cell and go to Data > Sort & Filter > Filter icon.

c. As shown below the filter arrows will appear in the header. Click on the Marks filter
arrow.

Filter Icon
d. The following window will appear. Click on Filter Icon > Number Filters > Greater than.

e. It will display the Custom Filter window. In the textbox, type 85 and press ok.

f. It will show you the following filtered output.

Filtered Output
g. To quickly find the sum of the filtered column, select the range and click on AutoSum
under the Home tab. You will have your filtered sum in the selected cell.

Filtered Sum
How to do subtraction in Excel

Choose the cell where you want the result to appear as cell B4 in this example. Then type = sign
in the cell, now select first cell B1 then type "-" sign then select second cell B2. Now press the
enter key, you will get the subtraction of these two numbers.

This is the result. This steps also apply in multiplication and division
How to calculate average in Excel

MS Excel, or Microsoft Excel, is the world's most popular spreadsheet software that enables users
to record massive amounts of data and perform various operations. It makes it easier to perform
analytical tasks and mathematical calculations on the recorded data in cells across worksheets.
Finding an average (also called arithmetic mean) is one commonly used mathematical task we
often perform in Excel.

What is Average in Excel?

In Excel, the average is categorized as one of the statistical functions that help us retrieve the
arithmetic mean value for a given series of many numeric figures. In particular, the average value
is calculated by adding all the given numeric values and then dividing the sum results by the total
number count of values we added in the sum calculation. Although it seems easy to calculate the
average for a small group of numbers, it becomes difficult and prone to errors when dealing with
larger data sets.

Calculating Average in Excel: General Method

Since the average for numbers can be calculated by adding all numbers and dividing their results,
we can use the SUM and COUNT functions in Excel to apply this concept.

The average in a mathematical way is calculated like this:

10+15+20+25+30 / 5

If we want to calculate this in Excel, we can use the formula with SUM and COUNT functions like
this:

=SUM(A1:A5)/COUNT(A1:A5)

Formula

Average
Calculating Average in Excel: AVERAGE function

The AVERAGE function is an existing Excel statistical function that is most widely used to calculate
the averages (arithmetic mean) in an Excel sheet. The function is mainly helpful when there is no
specific limitation when calculating averages.

Syntax

Syntax is the set of rules that define what the various combinations of symbols mean.

The syntax of the AVERAGE function in Excel is defined as below:

Steps to use the AVERAGE function

Let us now understand the application of the AVERAGE function with an example.

To determine the average grade in our sample Excel sheet, we can follow these steps:

a. We need to apply the AVERAGE formula in cell B8 and supply the necessary arguments to
it. For this, we first enter the equal (=) sign and then type the function name (=AVERAGE).
b. After typing the function name, we must enter the opening parenthesis and pass the
individual cell references or a range in the formula. We can select or enter the range B2:B7
directly in our formula.

c. Once the arguments have been given in the formula, we must press the ENTER key on the
keyboard. This will immediately calculate the average for the given data set. The below
image shows the average grade of the students in our example:

d. The non-contiguous cells can likewise be used as arguments in the formula. We need to
use commas to separate them. In this example we compute the average grade of Jio, Leo
and Choy
Calculating Average in Excel: AVERAGEA function

The AVERAGEA function in Excel also helps us calculate the average or arithmetic mean of the
desired arguments within the worksheet. The function has been available in all the versions of
Excel since Excel 2007. The AVERAGEA function is mainly used to eliminate the discrepancy of
the AVERAGE function and can include or accept all data types (or values) within a distribution.

Unlike the AVERAGE function, the AVERAGEA function evaluates the text values as zeros.
Furthermore, the logical values are also treated differently by the AVERAGEA function. It
evaluates the logical value TRUE as 1, while the logical value FALSE is evaluated as 1.

Syntax

The syntax of the AVERAGEA function in Excel is defined as below:

Steps to use the AVERAGEA function

The application of the AVERAGEA function is precisely the same as the AVERAGE function. Let us
now take an example of the following Excel sheet where we have some names (range A2:A7) and
their grade (range B2:B7). We need to calculate the average of marks using the AVERAGEA
function in cell B8.

We can apply the AVERAGEA formula by performing the below steps:

a. We must enter the AVERAGEA function after the equal sign. We must start the
parenthesis, select the effective range B2:B7, and close the parenthesis.
b. After clicking the ENTER key, we get the average marks of the students in cell B8, as
shown below:

c. We see a difference between both results if we now calculate the average marks using
the AVERAGE function in cell B9. It occurs as the division Count number is different
for both functions.

String Value

AVERAGEA formula = 90 + 88 + 78 + 75 + 82 / 6 = 68.83


in AVERAGEA formula string value consider as 0

AVERAGE formula = 90 + 88 + 78 + 75 + 82 / 5 = 82.6


In AVERAGE formula string value is disregarded
d. However, by changing the text value (Drop) in cell B6 to zero (0), we get the same
result from both functions because both include zero values when calculating the
average.

We change
from Drop
to zero (0)

Calculating Average in Excel: AVERAGEIF function

The AVERAGEIF function is another existing function that enables users to calculate the average
for the given data set. Unlike the AVERAGE and AVERAGEA functions, the AVERAGEIF function
also enables users to apply any specific criteria, meaning the average will be calculated for
numbers following the applied criteria. With the AVERAGEIF function, Excel first looks in the given
data set for a stated criteria/condition. It then calculates the arithmetic mean of the effective
resultant cells that follow or satisfy those particular criteria.

Syntax

The syntax of the AVERAGEIF function in Excel is defined as below:

Where the range, criteria, and average range are the arguments of the AVERAGEIF functions.

o Range: It is a mandatory argument used to represent the area/ location on the sheet
that contains cells with data required to be tested against the given criteria or condition.

o Criteria: It is another mandatory argument used to specify a rule/ condition to include


only the specific cells or data while computing the averages. The criteria we need to
specify here may include numbers, text values, logical expressions, cell references, or a
range.

o Average_range: It is an optional argument used to specify the range of cells where we


want to calculate the average. If average_range is not specified, the function uses the
range by default.
Steps to use the AVERAGEIF function

Example of Excel sheet where we have the names of some course, year level and no. of students

a. In order to record the average number of students for the BSA, we must use cell C8.
b. Enter the AVERAGEIF formula in the following way:

=AVERAGEIF(A2:C7, "BSA", C2:C7)

Function Range Criteria Average Range


Although the average_range is optional, we had to specify this to include only the cells with
numbers (no. of students). In our example, if we don't specify the average_range, the function
will take the entire range A2:C7 where there are also text values. This will result in #DIV! error.

After entering the formula, we must press the Enter key on the keyboard to retrieve the formula
result.

Calculating Average in Excel: AVERAGEIFS function


The working concept of the AVERAGEIFS function in Excel is similar to the AVERAGEIF function,
although the AVERAGEIFS function allows multiple criteria to be tested while calculating the
average. However, the AVERAGEIF function only allows one condition at a time. Unlike the
AVERAGEIF function, the AVERAGEIFS function also includes the cells containing TRUE and FALSE,
which is somehow required in some cases to test multiple criteria.
Syntax

The syntax of the AVERAGEIFS function in Excel is defined as below:

Where the average_range, criteria1_range2, and criteria1 are the mandatory arguments of the
AVERAGEIFS functions. All other arguments are optional and used according to the given data
set. Additionally, criteria1 is the rule/condition to be used on the specified range1, while criteria2
is the condition for the range2 and more.

Steps to use the AVERAGEIFS function

Let us take the same example datasheet that we used for the AVERAGEIF function. In that sheet,
we have the names of some courses (A2:A8) with no. of students (C2:C8). Some courses are also
repeated with different year level and no. of students.

a. For the range A2:A8, the only condition (criteria) is "BSA", and three rows satisfy this
condition
b. For the range C2:C8, the condition (criteria) is "greater than (>) 22", and only two out of
three rows with the BSA satisfy this condition
c. So, the average no. of students will be calculated using the following mathematical
operation:

(25 + 40) / 2 = 32.5


d. However, we need to use the OR logical operator to test multiple conditions in Excel. It
returns either TRUE or FALSE based on the condition of satisfaction. For instance, if we
want to test if the cell A1 contains "BSA", we can use this:

=OR(A2=”BSA”)
e. We check the condition only for the "BSA" in the entire range A2:A8 in the following way:

f. We only apply the OR condition =OR(A2="BSA") in cell D2 and copy it to the remaining
cells below. Hold down the box icon in the cell's lower left corner and drag it to duplicate
the formula.

This is the output


Since we need to apply multiple criteria while calculating the average, we use the AVERAGEIFS
function using the following steps:

g. Like applying the other Excel functions, we first need to select the resultant cell to record
a result. So, we select cell C9.
h. Enter the equal sign, type the function name AVERAGEIFS and enclose the required
arguments within the parenthesis signs in the following way:

=AVERAGEIFS(C2:C8,D2:D8,"TRUE",C2:C8,">22")

Here, we only considered the course name "BSA" by following the TRUE results and only
those that have no. of students above 22.

Excel Fill Handle

The Fill handle is an Excel feature that is used to fill the data automatically with a specific pattern.
You can extend a series of numbers, dates and text combinations to the desired number of cells.

Fill handle is a versatile tool in the excel suite that autocompletes various entries, transforms the
data, and several other applications. It is an inbuilt excel feature that is enabled by default and
therefore does not involve any manual procedure to implement it.

To use the fill handle, move your mouse pointer to the right bottom corner of the cell; it will
change into a tiny + (cross) sign. Drag the cross sign, and if Excel recognizes the pattern, it will
autofill the cells with the updated data. Else it will copy the same data in all the dragged cells.

How to Use Fill Handles in Excel?

a. Enter the first two entries of your data. Unlike we have entered 1 and 2 in the cell A1 and
A2.
Enter first 2 entries

b. Select both the cells and hover the mouse over the bottom-right edge of the rectangle
window. You will notice the cursor will immediately change to a plus (+) icon.

Your cursor
+ will change to
+ (plus) icon
c. Click on the mouse and drag the cross (+) icon down to the below cells until it reaches the
25th value. As you can see in the below example, excel will automatically identify the
pattern that will fill the first 15 entries for you (increment by 1).

d. If you want to fill data in the adjacent row, fill the first entry and hover the pointer over
the right edge of the selection window. It will change to a plus icon (+); double click on it.
The fill handle will automatically fill all the values to the last cell (based on the entries in
the adjacent column). As you see in the below example we have copied the values of
Column A to Column B.
Examples of Using Fill Handle in Excel

In the above examples, we covered the steps to use the fill handle feature in excel to autofill the
list of the first 15 numbers. However, it is a basic operation that we have performed. There occurs
many situations where the fill handle is an advantage as it automatically recognizes the pattern
and fills the cells correctly.

1. Autofill Weekday Names

Entering the list of days in excel is one of the common operations performed by every user. You
can quickly fill the week names using the Fill Handle feature.

a. Enter the full week name, i.e., Monday. You can also enter the three alphabet terms, i.e.,
Mon.

b. Select the cell and bring your mouse cursor over the bottom-right edge of the rectangle
window. You will note the cursor will change to plus (+) sign.

+ Drag down the


cross sign

c. Autocomplete the cells with the weekday names by dragging the cursor down.

2. Autofill Dates
Dates are also commonly used in our day-to-day excel life. Therefore using the Fill handle, you
can easily autofill dates in your spreadsheet.

a. Enter the Date in the first cell and drag the cross (+) sign to the following cells. The date
values will be auto-filled in the dragged cells. You will notice Excel will automatically
increment the day field by 1.

The date values


will be auto-filled
and incremented
by 1

Excel Creating Formulas

Microsoft Excel is a widely used powerful spreadsheet program that provides access to different
worksheets in a single workbook. Users can store large amounts of data in these worksheets
using existing cells. One of the significant advantages of using Excel is that it allows us to perform
various calculations, operations, and analysis. Excel has a wide range of pre-defined functions,
and we can perform almost every operation in Excel by creating formulas through existing
functions.

What is the Formula in Excel?

An Excel formula is nothing but an introductory statement consisting of one or more 'operands'
and 'operators'. The formulas in Excel help us specify the relationship between the values
recorded within the cells in the worksheet, perform mathematical calculations on the recorded
values, and retrieve the desired results in a resultant cell.

One essential point to note while using the formulas in Excel is that we must always start them
with an equal sign (=). If we don't start the formulas with an equal sign, they are not treated as
formulas but only as a text string.

The Difference between a Formula and Function

An Excel formula is a statement or an equation structured manually by a user to perform any


calculation. At the same time, the Excel function is the pre-defined calculation in the spreadsheet
program. We can use more than one function in a formula.

Example of Formula: =A1+A2+A3

Example of Function: =SUM(A1:A3)


Creating Formulas using Constants and Operators

To create a basic Excel formula in an Excel cell using the constants and operators, we must
perform these steps.

a. Select a cell to record the output or result


b. Type an equal symbol (=) and enter the formula equation to perform the calculation.
c. Press the Enter key on the keyboard to obtain the results.

In this example we select A1 cell and type =5+10 formula

Creating Formulas using Cell References

Instead of typing the numbers directly into the Formula equation, we can also refer to the
corresponding cells that contain the required numbers (or values) in the sheet. It is more
convenient and easier to use cell references in formulas when working with large data sets.
Furthermore, one advantage of using a cell reference is that the formula results are automatically
updated in real time whenever we change the value in the corresponding cell/range.

To create a formula using the cell references, we can perform these steps:

a. Select a cell to record the output.


b. Enter the equal sign (=). After that, we need to type the first cell that contains the number.
It is not mandatory to always type the cell reference. Instead, we can also click on the
specific cell, and Excel will automatically fetch the cell reference of that cell in the applied
formula. This eliminates human error.
c. Type the operator sign we want to apply for the formula.
d. Type or click the cell reference of another number that we want to include in our formula.
e. Press the Enter key to obtain the formula result.

In this example we select C1 to record the output


Excel Fill Handle in Formulas

We can use Fill handle to perform the calculations. Select the cell you wish to fill in and follow
the same procedures on Excel by dragging down or clicking twice on the + (plus) sign.

Absolute Referencing in Excel

Consider the following sheet as an example data set where we have prices of different items in
USD ($).

The steps to convert or change the recorded prices from USD to PHP by using the multiplication
formula.

a. Select cell C5 and type an equal sign (=) to start the formula. Next, we select the cell B5,
type the multiplication operator (*), and select cell B2. After that, we press the Enter key
to get the corresponding result for the first item.
b. As you can see in this example, using the Excel Fill Handle approach does not allow us to
get the desired results. Follow these next steps to correct the issues.

c. Before copying the formula into other cells, we again select the cell where we have
initially inserted the formula, i.e., cell C5. Then, we go to the formula bar and click or place
the cursor in between cell B2.

d. Press the F4 function key once. This immediately changes the reference from B2 to $B$2
in the cell C5, and the entire formula changes from (=B5*B2) to (=B5*$B$2), as shown
below:
e. Once the cell reference has been converted into the absolute reference, we must press
the Enter key. Lastly, we can drag or copy-paste the formula into other cells below C5,
and the prices will be converted from USD to PHP correctly.

Basic Excel Functions that we can use quickly in Excel

Excel has over 400 predefined functions, and this number steadily increases from version to
version with every upgrade. We usually don't need to memorize them all. Instead, we can access
the desired function using the function wizard. However, it is beneficial to know some quick Excel
functions that we often need to use. Below we discuss some basic but valuable quick Excel
functions that we often need to use as a beginner:

COUNT

The COUNT function in Excel is another essential function used to count the total number of cells
in a given range that contains numeric values. Using the COUNT function, we quickly know about
the number/ count of numeric values (numbers) entries. The COUNT function usually ignores
data sets other than numbers.

The syntax of the COUNT function is defined as below:

=COUNT(B2:B13)
We enter any text value (i.e., "No Sales") in any of the cells of the range B2:B13. So, the results
change to 11 because the COUNT function ignores the cells with text values.

We can apply the COUNTA function to measure all the cells in a range irrespective of the numbers
or text values.

MAX & MIN

MAX and MIN are the two different basic functions in Excel and are quick to use within the desired
cell. Both functions have almost the opposite operations. The MAX function helps us get the
maximum value in a given set of data, cells, or ranges. In contrast, the MIN function helps us get
the minimum value in a specific range. However, the syntax and the application process of MAX
and MIN functions are similar.

The syntax of the MAX function is defined as below:


=MAX(B2:B13)

=MIN(B2:B13)

TRIM

When creating formulas in an Excel cell, we often encounter unexpected error codes instead of
the expected results. The formula returns errors due to several reasons. One of the most
common causes of formula errors may be the presence of unnecessary spaces in a cell. Therefore,
we may need to remove such unwanted spaces in our worksheets. However, deleting the extra
spaces within the large data set might be somewhat tricky if we try to check and delete them
manually. This is where the TRIM function is helpful.

Although there are multiple ways to delete extra unwanted spaces from our worksheet, the TRIM
function makes it more accessible. The function eliminates all extra spaces in given cells but
retains a single space character between two or more words.
The syntax of the TRIM function in Excel is defined as below:

=TRIM(A2)

CONCATENATE

The CONCATENATE function in Excel helps us quickly combine values from two or more cells into
a new cell.

The syntax of the CONCATENATE function is defined as below:

=CONCATENATE(A1,B1)

If we want to separate the combined values using the space, we can pass the space character as
an argument in the CONCATENATE function in the following way:

=CONCATENATE(A1," ",B1)
TODAY & NOW

In Excel, the TODAY and NOW are two different functions where the TODAY function helps us
return the current date while the NOW function returns the current time and time both. Both
functions are helpful if we don't remember the date or time but need to use them within the
Excel cells. The beauty of these two functions is that we don't even need to pass any arguments
in them.

We can use the syntax of TODAY and NOW functions in the following ways, respectively:

=TODAY( )
=NOW( )

You might also like