0% found this document useful (0 votes)
261 views9 pages

Excel Formulas & Functions: Learn With Basic Examples: Tutorials Data

This document provides an overview of formulas and functions in Excel. It introduces common formulas like SUM and functions like AVERAGE. It discusses the importance of using functions for efficiency. Examples are provided for numeric, statistical, and string functions. Datasets are included for tutorial examples on calculating subtotals and scheduling.

Uploaded by

ami i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
261 views9 pages

Excel Formulas & Functions: Learn With Basic Examples: Tutorials Data

This document provides an overview of formulas and functions in Excel. It introduces common formulas like SUM and functions like AVERAGE. It discusses the importance of using functions for efficiency. Examples are provided for numeric, statistical, and string functions. Datasets are included for tutorial examples on calculating subtotals and scheduling.

Uploaded by

ami i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Excel Formulas & Functions: Learn with

Basic EXAMPLES
Formulas and functions are the building blocks of working with numeric data in
Excel. This lecture introduces you to formulas and functions.

In this lecture, we will cover the following topics.

 What is Formulas in Excel?


 Mistakes to avoid when working with formulas in Excel
 What is Function in Excel?
 The importance of functions
 Common functions
 Numeric Functions
 String functions
 Date Time functions
 Lookup function

Tutorials Data
For this tutorial, we will work with the following datasets.

Home supplies budget

S/N ITEM QTY PRICE SUBTOTAL Is it Affordable?


1 Mangoes 9 600    
2 Oranges 3 1200    
3 Tomatoes 1 2500    
4 Cooking Oil 5 6500    
5 Tonic Water 13 3900    

House Building Project Schedule Providing Software Updates to Older Devices

S/N ITEM START DATE END DATE DURATION (DAYS)


1 Survey land 04/02/2015 07/02/2015  
2 Lay Foundation 10/02/2015 15/02/2015  
3 Roofing 27/02/2015 03/03/2015  
4 Painting 09/03/2015 21/03/2015  
What is Formulas in Excel?
FORMULAS IN EXCEL is an expression that operates on values in a range of cell
addresses and operators. For example, =A1+A2+A3, which finds the sum of the range
of values from cell A1 to cell A3. An example of a formula made up of discrete values
like =6*3.

=A2 * D2 / 2

HERE,

 "=" tells
Excel that this is a formula, and it should evaluate it.
 "A2" * D2" makes reference to cell addresses A2 and D2 then multiplies the
values found in these cell addresses.
 "/" is the division arithmetic operator
 "2" is a discrete value

Formulas practical exercise


We will work with the sample data for the home budget to calculate the subtotal.

 Create a new workbook in Excel


 Enter the data shown in the home supplies budget above.
 Your worksheet should look as follows.
We will now write the formula that calculates the subtotal

Set the focus to cell E4

Enter the following formula.

=C4*D4

HERE,

 "C4*D4" uses the arithmetic operator multiplication (*) to multiply the value of


the cell address C4 and D4.

Press enter key

You will get the result in the subtotal column

Mistakes to avoid when working with formulas in Excel


1. Remember the rules of Brackets of Division, Multiplication, Addition, &
Subtraction (BODMAS). This means expressions are brackets are evaluated
first. For arithmetic operators, the division is evaluated first followed by
multiplication then addition and subtraction is the last one to be evaluated.
Using this rule, we can rewrite the above formula as =(A2 * D2) / 2. This will
ensure that A2 and D2 are first evaluated then divided by two.
2. Excel spreadsheet formulas usually work with numeric data; you can take
advantage of data validation to specify the type of data that should be accepted
by a cell i.e. numbers only.
3. To ensure that you are working with the correct cell addresses referenced in the
formulas, you can press F2 on the keyboard. This will highlight the cell
addresses used in the formula, and you can cross check to ensure they are the
desired cell addresses.
4. When you are working with many rows, you can use serial numbers for all the
rows and have a record count at the bottom of the sheet. You should compare
the serial number count with the record total to ensure that your formulas
included all the rows.

What is Function in Excel?


FUNCTION IN EXCEL is a predefined formula that is used for specific values in a
particular order. Function is used for quick tasks like finding the sum, count, average,
maximum value, and minimum values for a range of cells. For example, cell A3
below contains the SUM function which calculates the sum of the range A1:A2.

 SUM for summation of a range of numbers


 AVERAGE for calculating the average of a given range of numbers
 COUNT for counting the number of items in a given range

The importance of functions


Functions increase user productivity when working with excel. Let's say you
would like to get the grand total for the above home supplies budget. To make it
simpler, you can use a formula to get the grand total. Using a formula, you would
have to reference the cells E4 through to E8 one by one. You would have to use the
following formula.

= E4 + E5 + E6 + E7 + E8

With a function, you would write the above formula as

=SUM (E4:E8)

As you can see from the above function used to get the sum of a range of cells, it is
much more efficient to use a function to get the sum than using the formula which will
have to reference a lot of cells.

Common functions
Let's look at some of the most used functions in ms excel formulas. We will start with
statistical functions.
CATEGOR
S/N FUNCTION DESCRIPTION USAGE
Y
01 SUM Math & Trig
Adds all the values in a range of cells =SUM(E4:E8)
02 MIN Statistical
Finds the minimum value in a range of cells =MIN(E4:E8)
03 MAX Statistical
Finds the maximum value in a range of cells =MAX(E4:E8)
04 AVERAGE Statistical
Calculates the average value in a range of cells =AVERAGE(E4:E8)
05 COUNT Statistical
Counts the number of cells in a range of cells =COUNT(E4:E8)
06 LEN Text Returns the number of characters in a string text =LEN(B7)
Adds all the values in a range of cells that meet
07 SUMIF Math & Trig a specified criteria. =SUMIF(range,criteria, =SUMIF(D4:D8,">=1000",C4:C8)
[sum_range])
Calculates the average value in a range of cells
AVERAGEI
08 Statistical that meet the specified criteria. =AVERAGEIF(F4:F8,"Yes",E4:E8)
F
=AVERAGEIF(range,criteria,[average_range])
09 DAYS Date & Time Returns the number of days between two dates =DAYS(D4,C4)

10 NOW Date & Time Returns the current system date and time =NOW()

Numeric Functions
As the name suggests, these functions operate on numeric data. The following table
shows some of the common numeric functions.

S/ CATEGOR
FUNCTION DESCRIPTION USAGE
N Y
Returns True if the supplied value is numeric and False if it
1 ISNUMBER Information =ISNUMBER(A3)
is not numeric
2 RAND Math & Trig Generates a random number between 0 and 1 =RAND()
Rounds off a decimal value to the specified number of
3 ROUND Math & Trig =ROUND(3.14455
decimal points
Returns the number in the middle of the set of given
4 MEDIAN Statistical =MEDIAN(3,4,5,2
numbers
5 PI Math & Trig Returns the value of Math Function PI(π) =PI()
Returns the result of a number raised to a
6 POWER Math & Trig =POWER(2,4)
power. POWER( number, power )
7 MOD Math & Trig Returns the Remainder when you divide two numbers =MOD(10,3)
8 ROMAN Math & Trig Converts a number to roman numerals =ROMAN(1984)

String functions
These basic excel functions are used to manipulate text data. The following table
shows some of the common string functions.

S/N FUNCTION CATEGORY DESCRIPTION USAGE COMMENT


Returns a number of specified
Left 4 Characters of
1 LEFT Text characters from the start (left- =LEFT("GURU99",4)
"GURU99"
hand side) of a string
Returns a number of specified
Right 2 Characters of
2 RIGHT Text characters from the end (right- =RIGHT("GURU99",2)
"GURU99"
hand side) of a string
Retrieves a number of
characters from the middle of
a string from a specified start Retrieving Characters
3 MID Text =MID("GURU99",2,3)
position and length. =MID 2 to 5
(text, start_num,
num_chars)
Returns True if the supplied value - The value to
4 ISTEXT Information =ISTEXT(value)
parameter is Text check.
Returns the starting position
of a text string within another
text string. This function is Find oo in "Roofing",
5 FIND Text =FIND("oo","Roofing",1)
case-sensitive. =FIND(find_t Result is 2
ext, within_text,
[start_num])
Replaces part of a string with
another specified
=REPLACE("Roofing",2, Replace "oo" with
6 REPLACE Text string. =REPLACE
2,"xx") "xx"
(old_text, start_num,
num_chars, new_text)

Date Time Functions


These functions are used to manipulate date values. The following table shows some
of the common date functions

S/ CATEGOR
FUNCTION DESCRIPTION USAGE
N Y
1 DATE Date & Time Returns the number that represents the date in excel =DATE(2015,2,4)
S/ CATEGOR
FUNCTION DESCRIPTION USAGE
N Y
code
2 DAYS Date & Time Find the number of days between two dates =DAYS(D6,C6)
3 MONTH Date & Time Returns the month from a date value =MONTH("4/2/2015")
4 MINUTE Date & Time Returns the minutes from a time value =MINUTE("12:31")
5 YEAR Date & Time Returns the year from a date value =YEAR("04/02/2015")

LOOKUP function
The Microsoft Excel LOOKUP function returns a value from a range (one row or one
column) or from an array.
The LOOKUP function is a built-in function in Excel that is categorized as
a Lookup/Reference Function. It can be used as a worksheet function (WS) in Excel.
As a worksheet function, the LOOKUP function can be entered as part of a formula in
a cell of a worksheet.
LOOKUP Function (Syntax)
In Syntax #1, the LOOKUP function searches for value in the lookup_range and
returns the value in the result_range that is in the same position.
The syntax for the LOOKUP function in Microsoft Excel is:

LOOKUP( value, lookup_range, [result_range] )

Parameters or Arguments
value
The value to search for in the lookup_range.
lookup_range
A single row or single column of data that is sorted in ascending order. The
LOOKUP function searches for value in this range.
result_range
Optional. It is a single row or single column of data that is the same size as
the lookup_range. The LOOKUP function searches for the value in
the lookup_range and returns the value from the same position in
the result_range. If this parameter is omitted, it will return the first column of
data.

Returns
The LOOKUP function returns any datatype such as a string, numeric, date,
etc.
If the LOOKUP function can not find an exact match, it chooses the largest
value in the lookup_range that is less than or equal to the value.
If the value is smaller than all of the values in the lookup_range, then the
LOOKUP function will return #N/A.
If the values in the LOOKUP_range are not sorted in ascending order, the
LOOKUP function will return the incorrect value.

VLOOKUP function
The VLOOKUP function is used to perform a vertical look up in the left most column
and return a value in the same row from a column that you specify. Let's explain this
in a layman's language. The home supplies budget has a serial number column that
uniquely identifies each item in the budget. Suppose you have the item serial number,
and you would like to know the item description, you can use the VLOOKUP
function. Here is how the VLOOKUP function would work.

=VLOOKUP (C12, A4:B8, 2, FALSE)

HERE,

 "=VLOOKUP" callsthe vertical lookup function


 "C12" specifies the value to be looked up in the left most column
 "A4:B8" specifies the table array with the data
 "2" specifies the column number with the row value to be returned by the
VLOOKUP function
 "FALSE," tells the VLOOKUP function that we are looking for an exact match
of the supplied look up value

Summary
Excel allows you to manipulate the data using formulas and/or functions. Functions
are generally more productive compared to writing formulas. Functions are also more
accurate compared to formulas because the margin of making mistakes is very
minimum.

You might also like