100% found this document useful (1 vote)
22 views

Excel Note + Examples

Uploaded by

ntlokoq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
22 views

Excel Note + Examples

Uploaded by

ntlokoq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

Gradi Mukwasa

EXCEL FUNCTIONS

❑ Excel function is a formula, that helps perform


mathematical, statistical and logical operations.

❑ Once you are familiar with the function you want to use,
all you must do is enter an equal sign (=) in the cell,
followed by the name of the function and the cell range it
applies to.
Key word:
String- a string is a group of characters that are used as
data in a spreadsheet program. In simple English it is
referred to as a text. Gradi Mukwasa
Types of Excel Functions:

❖ Text function: This is function that deals with a specific text on a specific cell.
Examples of Text Functions:

1. Concatenate Function:
This is a function that is used to join two or more text strings into one string.

Gradi Mukwasa
✓ How to use the concatenate function:

Syntax: CONCATENATE(text1, [text2], ...)

=CONCATENATE(B2, " ",C2)

Note that the “ ” is for creating space between the words or sentences that you’ll be joining.

Important note: In Excel 2016, this function has been replaced with the CONCAT function.
Although the CONCATENATE function is still available for backward compatibility, you should
consider using CONCAT from now on. This is because CONCATENATE may not be available in
future versions of Excel.
Gradi Mukwasa
2. LEN Function

Gradi Mukwasa
▪ LEN Function
LEN is used to count the number of characters in a text or string.

The length function is used to calculate the length of a string, which


contains special characters, space, numbers, letters, etc.

Gradi Mukwasa
3. RIGHT Function
RIGHT returns the last character or characters in a text string,
based on the number of characters you specify.

✓ How to use the RIGHT function

RIGHT(text,[num_chars])

Text - Required. The text string containing the characters you want to
extract.

Num_chars - Optional. Specifies the number of characters you want


RIGHT to extract. Gradi Mukwasa
4. Left Functions
Left function -returns the first character or characters in a text string,
based on the number of characters you specify.
you specify.

Text - Required. The text string that contains the characters you want
to extract.

Num_chars - Optional. Specifies the number of characters you want


LEFT to extract.

Gradi Mukwasa
5. Upper, Lower & Find Functions

Upper functions - Converts all the letters in a string to upper case


Eg: =UPPER(text)

Lower Functions - Converts all the letters in a string to lower


case.
Eg=LOWER(text)

Find functions- Find Determines the starting position of a


substring within a string.

Eg- =Find(find_text,within_text,[start num])

Gradi Mukwasa
How to use the upper function

Results:

Gradi Mukwasa
HOW TO USE THE LOWER FUNCTION

Gradi Mukwasa
Logical functions in Excel work with conditions. They help deal with different situations accordingly..

Gradi Mukwasa
❖ IF function

IF Function is one of the most commonly & frequently used logical


function in Excel.

Usually, IF function runs a logical test & checks whether a condition or


criteria is met or not, and returns one value in a result, it may be
either, if true and another value if false, these are the two possible
outcomes with if function.
What does the if function do?
It allows you to make logical comparisons between a value and what
you expect.

So, an IF statement can only have two results. The first result is if your
comparison is True, the second if your comparison is False.
Gradi Mukwasa
How to use the if function?

Example:
Step 1: When we enter the IF function, Excel automatically pops up the
list of arguments, as shown in the following screenshot.

Gradi Mukwasa
Step 2: The first argument is the logical test. In this case, the condition is
that if marks are more than 40, then the result is PASS, or else it is FAIL.
We passed the condition as the argument in the IF function as shown
below.

Gradi Mukwasa
Step 3: The second and third arguments are ‘value_if_true’ and
‘value_if_false’, respectively. If marks are greater than 40, then the result
should be PASS; otherwise, FAIL. This has been accomplished by
passing the arguments as shown in the following screenshot.

Gradi Mukwasa
Step 4: Copy the IF function across all the required cells, and we are
returned the correct result as shown in the following screenshot.

Gradi Mukwasa
❖ Nested if
Sometimes you need to work with situations or conditions where there
are more than two possible outcomes; in this scenario, the Nested IF
Formula helps you out.

Nesting means a combination of formulas, one inside the other, where


each formula controls or handles the result of others

Nested if can be is used when there’s three or more comparison to


make .

Nested if is not an Excel function. It is a combination of if functions.


Therefore, while entering this formular do not enter =nested if ,
instead do it is shown below.

Gradi Mukwasa
Syntax of Nested IF Formula:

=IF(condition, value_if_true1, IF(second condition, value_if_true2,


value_if_false2 ))

The Nested IF Formula syntax or formula has the below-mentioned arguments:

• Condition: It is the value that you want to test.

• value_if_true: The value appears or returns if the logical condition


evaluates to TRUE.

• value_if_false: The value appears or returns if the logical condition


evaluates to FALSE.
Gradi Mukwasa
How to use the NESTED IF function?
Let us analyze the Nested IF Formula with Multiple Criteria.

In the below-mentioned example, the table contains a list of the student in column B (B2 to
B18) & the score of each student (C2 to C18)

Gradi Mukwasa
Here, I want to categorize their scores with the below-mentioned conditions:

DISTINCTION: Over 85.


FIRST CLASS: Between 60 and 84, inclusive.
SECOND CLASS: Between 35 and 59, inclusive.
FAIL: Under 35.

With the above conditions, I need to categorize students’ results based on their
score, Here Nested IF Formula. I need to build that formula with multiple IF
statements.

Let’s start entering the first IF statement:


=IF(C3>=85,”DISTINCTION”,

Gradi Mukwasa
This takes care of the “DISTINCTION” category students now if I want to
handle the second category. “FIRST CLASS”, I need to add another
conditional statement:

=IF(C3>=85,”DISTINCTION”, IF(C3>=60, “FIRST CLASS”, IF(C3>=35,


“SECOND CLASS”,

Gradi Mukwasa
I continue with similar steps until I reach the last category. Now, I have left
with the last category, “FAIL”, if the last category or criteria appears, instead
of adding another IF, just I need to add the “FAIL” for a false argument
(value_if_false argument).

Gradi Mukwasa
After entering the last category, you need to close it with three closed brackets.

In the last criteria, value_if_false argument, if the score is less than 35, IF function returns
FALSE, as we don’t supply a value if false.

=IF(C3>=85,”DISTINCTION”,IF(C3>=60,”FIRST CLASS”,IF(C3>=35,”SECOND
CLASS”,”FAIL”)))

Gradi Mukwasa
Final Result:

Gradi Mukwasa
VLOOKUP FUNCTION
VLOOKUP stands for Vertical Lookup which means that a value is searched for from top to bottom in a
column.
In its simplest form, the VLOOKUP function says:

=VLOOKUP (What you want to look up, where you want to look for it, the column number in the range
containing the value to return.)

When dealing with Vlookup it is important to put the Dollar sign, in order to avoid inconsistency.

This Dollar sign is known as an absolute value.


Gradi Mukwasa
Hlookup is used for mapping and looking up the values that are
horizontally filled. Similar to Vlookup, Hlookup is also having the same
syntax.

The only difference is that instead of using column_index_num, in


Hlookup we use row_index_num. Gradi Mukwasa
• Lookup_value: It is the fixed reference lookup cell for which we need to find
the value.

• Table_array: It is that table from which we need to find the value.

• Row_index_num: Exact sequence of a row for looking up the value.

• [Range_lookup]: Here, we will fix an exact or approximate match as per


data type.

Gradi Mukwasa
XLOOKUP
XLOOKUP function is an improved version of VLOOKUP & Hlookup that works in any
direction and returns exact matches by default, making it easier and more convenient to use
than its predecessor.

XLOOKUP can find values in vertical or horizontal ranges, can perform approximate and
exact matches, and supports wildcards (* ?) for partial matches. In addition, XLOOKUP can
search data starting from the first value or the last value (see match type and search mode
details below). Compared to older functions like VLOOKUP, HLOOKUP, and LOOKUP,
XLOOKUP offers several key advantages.

When dealing with Xlookup it is important to put the Dollar sign, in order to avoid
inconsistency.

**XLOOKUP IS ONLY AVAILABLE IN OFFICE 365

Gradi Mukwasa
Xlookup Arguments

lookup - The lookup value.

lookup_array - The array or range to search.

return_array - The array or range to return.

not_found - [optional] Value to return if no match found.

match_mode - [optional] 0 = exact match (default), -1 = exact match or next


smallest, 1 = exact match or next larger, 2 = wildcard match.

search_mode - [optional] 1 = search from first (default), -1 = search from last, 2


= binary search ascending, -2 = binary search descending.
Gradi Mukwasa
Gradi Mukwasa
Count function in excel is used to count the numbers only from any
selected range, a row, column, or matrix. For counting any range for
number, we just need to select the complete range; then, the count
function will return us the numbers that are in the selected range. It does
not consider any other input other than the number.
Gradi Mukwasa
COUNT Formula in Excel:

The Formula for the COUNT Function in Excel is as follows:

The Formula of COUNT Function many of value1, value2, value 3.

Value 1: This is the mandatory parameter. This is the first cell or range we are counting.

Value 2: This is the second set of cells or ranges we are looking to count. However, it is
not a mandatory argument. Once the first Value 1 is, all other values become optional.

Note: we can give up to 256 values to the COUNT function.

Gradi Mukwasa
How to use the count function?
This COUNT Function is very simple easy to use. Let us now see how to use the
COUNT Function in Excel with the help of some examples.

Consider the below data and apply the COUNT function to find the total
numerical values in the range.

Gradi Mukwasa
Apply COUNT function.

Gradi Mukwasa
❖ COUNT Functions

Countif function is the combination of Count and If function where


count function counts the cells as per the criteria which have set in the
Countif’s statement.

Gradi Mukwasa
COUNIF Function counts the cells that meet specific criteria or conditions. It can be used to
count cells with text, numbers, or dates that match specific criteria. The COUNTIF function also
works with logical operators (<, >, <>, =) and wildcards (*, ?).

Below is the COUNTIF Formula in Excel :

The COUNTIF Function in Excel has two arguments, i.e. range, criteria.

• Range: The range of cells to count. We give the range in a formula, e.g.
A1:A10.

• Criteria: This defines the condition that tells the function of which cells to
count. It can be a number, text string, cell reference, or expression.

Gradi Mukwasa
How to use countif ?
We have the sales data of a company XYZ. We need to find out which salesperson sells the
maximum and from which city we are ahead in profit to expand our business and distribute the
bonus accordingly per the sales employee performance.

Now, if we summarize the above data, we can predict the below results:

Gradi Mukwasa
Here we will use the COUNTIF Function.

For the Count of sales, we will take a range of sales amounts. We will count if to count
which sales are above 15000.

Gradi Mukwasa
Here we will use count if to count how many times Sam appear on the Sales Employees table:

The result will be :

Gradi Mukwasa
COUNTA
▪ COUNTA - Finds the number of cells that contain text in a specified cell range

Formula =COUNTA(Value 1,[value 2]).

COUNTBLANK

▪ COUNTBLANK- Finds the number of blank cells in a specified cell range


Formula =COUNTBLANK(range)

Gradi Mukwasa
How to use the Counta Function

Gradi Mukwasa
How to use the Countblank Function

Gradi Mukwasa
❖ SUMIF Function

Gradi Mukwasa
The sum function adds cells or all cells in a range. The SUMIF function is used to add cells
or a range when a specific criterion is met.

Therefore, this function adds all the cells that fulfill a certain condition or criteria. A
criterion could be a number, text, or logical operator. In short, it is a conditional sum of
cells in a range.

How to use the SUMIF FINCTION

The syntax has arguments, as mentioned below:

Range – It is a required argument. It is the cell range on which the condition/criteria is


applied. The cell should contain numbers or text, dates, cell references that have numbers.
If the cell is blank, it will be ignored.
Gradi Mukwasa
Criteria – It is a required argument.

It is the criteria that will decide which cells to be added. In other words,
it is the condition based on which the cells will be summed up. The
criteria can be text, number, dates in excel format, cell references, or
logical operators. It could be like 6, “yellow”, C12,”<5”, 05/12/2016, etc.

Sum_ range – It is the cell range that needs to be added.

It is an optional argument. They are the cells other than those found in
range. In case there is no sum range, the original cell range is then
added.

Gradi Mukwasa
How to Use SUMIF Formula in Excel?
SUMIF formula in excel is very simple and easy to use. Let’s start with a very simple example
of SUMIF. In this example, we only have one column or range.

Example #1
This is a very basic example, with only two arguments.

Below is the single column data on which we will use SUMIF. We need to add cells that are
above or >20 in the cell range A1: A8.

In this, the range is “A1: A8”, criteria is “>20”, and then


since there is no sum_range so the cells of range (A1: A8)
will be added.

Gradi Mukwasa
Example #2
In this example, we have a data set of different fruits and their stocks, as shown
below. Suppose we want to know the total stock of mangos out of all fruits.

Gradi Mukwasa
The arguments in the formula are explained below:

Range: A2: A11. In this range, the criteria of mangos will be applied.

Criteria: It is mangos, as we want to know the sum of mangos out of all fruits.

Sum_range: The sum range here is B2: B11.

Press Enter to get the result.


Gradi Mukwasa
We have 450 mangos out of all fruits.

Gradi Mukwasa
Example #3
We have sales data from different zones. Let’s say we want to know the total
sales for the South zone.

We will write the formula in cell B12 as below:

Range: A2: A10

Criteria: SOUTH

Sum_range: B2:B10
Gradi Mukwasa
Press Enter.

Gradi Mukwasa
Gradi Mukwasa
What is pivot table?

A pivot table is a special Excel tool that allows you to summarize and explore data
interactively. Let’s a lot harder to explain a pivot table than to show you how it works
so let’s look at a few examples.
Examples of Pivot Table
The data which I am going to use throughout this examples is shown
below:

Gradi Mukwasa
Example #1 – Automatically Creating a Pivot Table

How good it would have been if you don’t need to worry about the questions like –
“Which columns should be ideal for my pivot table?”, “Which columns should go under
rows, columns, values, etc.?”. Do you feel it’s a fantasy?

Let me take a moment to make you aware that this fantasy has become a reality in excel
now. If you have Excel 2013 or above installed in your system, it has an option called
Recommended PivotTables. Let’s see how it works.

Step 1 – Select any cell in your data and click insert >Recommended PivotTables (You
can see this option besides the PivotTable tab).

Gradi Mukwasa
Step 2 – Click > Recommended PivotTable.

Step 3 – Excel will quickly analyze your data and produce some of the recommended pivot table
layouts.

The recommended pivot table option uses the actual data from your worksheet. Hence, there is a
good chance that you’ll get a layout which you were looking for, or at least close to one of your
Gradi Mukwasa
interest.
Step 4 – Select any layout of your interest and click Excel created a pivot table on a new worksheet.

In the above example, we have seen the example of How we automatically create a table. Let us see
another example in the Pivot Table.

Gradi Mukwasa
Example #2 – Modifying Pivot Table
Once you create the pivot table, it is easy to modify the same. You can add some more fields in the layout
to display more summary using the PivotTable Fields pane, which can be found at the right-hand side of
your worksheet in which the pivot is.

Here, the column named Customer is added under Rows, and Branch is added under Columns. You can add
the columns under the Rows or Columns pane by simply dragging them down to the respective field area.

Gradi Mukwasa
On a similar note, you can also remove the field from the pivot table. Click on the column you
wanted to remove, and there a pane will open, under which you need to click on Remove Field,
and the field will be removed from the pivot table. Or you can simply drag the field out of the
pivot table pane, which yields the same result.

Gradi Mukwasa
If you add any field under the Filters section, it will appear at the upper part of the pivot table as
a drop-down list, which allows you to filter the displayed data by one or more than one item.

Gradi Mukwasa
The above figure shows the example of the Filter fields. I have added the Date under the filter field
and can use this column to filter my pivot data. For instance, I have filtered the data for 27-Nov-2018.
It means that my pivot table will now only show the data for 27-Nov-2018.

Gradi Mukwasa
Things to Remember

• Though it is very flexible, Pivot Table has its limitations. You can’t make a
change in the pivot table fields. You can’t add columns or rows under it and
can’t add formula within the pivot table. If you wanted to make changes in a
pivot table in a way not allowed normally, make a copy of your pivot table to
some other sheet and then do. Select your Pivot table and hit Ctrl + C. or go to
Home and select Copy under Clipboard.

• If you update your source data, make sure you are Refreshing the pivot table to
capture the latest updates made in your data. This is because pivot prevents
automatic up-gradation once the source data has been updated.

Gradi Mukwasa
Gradi Mukwasa
Formulas in excel are used for basic mathematical calculations such has addition,
subtraction, division as well as multiplication.
All the formulas in excel work exactly to the mathematics rule according to the below table.

I will show you a simple addition example. I have two numbers one is 10, and another one is 15. In
simple mathematics, we will do the calculation like this.

10 + 15 = 25.

Gradi Mukwasa
Now, look at the excel image below. In cell A1 and A2, I have 10 and 15, respectively.

Now I want to add these two numbers. I can do this calculation in two ways. All the formulas in excel will
start with an equal sign (=).

Either I can enter the numbers directly to the cell, or I can give a cell reference. Look at the below image. I
have passed the two numbers to the addition directly.

In cell D1, I have entered the formula as =10+15. This is not the dynamic formula because I have
not given any cell references here. Suppose I want the formula to show 30. As a result, I need to
Gradi Mukwasa
edit the formula and change the values.
Now, look at the below dynamic formula.

Now, look at the above image. In cell A3, I have mentioned the formula as =A1+A2. Instead of supplying
the values directly to the formula, I have given a reference to cells A1 and A2.

This is the dynamic formula because to change the result of the formula; I need not change the formula;
rather, I can change the values in cells A1 and A2.

Gradi Mukwasa
The date function is quite helpful for creating the dates that consider Month, Year, and Day. We can feed
any number here, and the Date function will create the date with respect to the value we feed in. This
function is quite useful and helpful for structuring the date standards when we have multiple dates in
multiple formats, and we want to standardize this with a single type for all.

Gradi Mukwasa
The Formula of DATE function includes 3 arguments, i.e.Year, Month, and Day.

Year: It is the mandatory parameter. A year is always a 4-digit number; since it is a number, we
need not to specify the number in any double-quotes.

Month: This is also a mandatory parameter. A month should be a 2-digit number that can be
supplied either directly to the cell reference or direct supply to the parameter.

Day: It is also a mandatory parameter. A day should be a 2-digit number.


Gradi Mukwasa
How to Use DATE Function in Excel?

This DATE Function in Excel is very simple easy to use. Let us now see how to use the DATE Function in Excel
with the help of some examples.

Example #1
From the below data, create full date values. In the first column, we have days; in the second column, we have
a month; and in the third column, we have a year. We need to combine these three columns and create a full
date.

Gradi Mukwasa
The Full DATE value is given below:

Gradi Mukwasa
Example #2 How to calculate the someone’s age:

To calculate someone’s present age will need to use the =today() function. What this
function does is that it return the present date.

In general terms if we want to calculate someone’s age, we say current date subtract from the date
the date that we wish to subtract right? Same applies to Excel but the only different is with Excel is
that we use =Today()-(The cell which you want to subtract)/365.

Note that in the formula above we divide by 365 why? It is because if we don’t divide by 365,
Excel will return the age in terms of days. So, that’s why we divide by 365 because there
365days in a year.

The following example will illustrate how to calculate someone’s age. Gradi Mukwasa
Here we used =(today()-G2)/365. I used G2 because it is the cell that contains
the year that we want we want to calculate the age. Make sure you put the
bracket correctly.
Gradi Mukwasa
If I press enter it will return the age as a date:

To change that I need to go to format cell click on number and make sure in has no decimal place.
The following diagram will illustrate how to that

Gradi Mukwasa
Gradi Mukwasa
Final results:

Gradi Mukwasa
❖ BASIC EXCEL FUNCTIONS

Gradi Mukwasa

You might also like