Working With Names, Ranges, Function and Lookup - Updated
Working With Names, Ranges, Function and Lookup - Updated
names
You can use a range name practically anywhere you can use a cell
or range reference.
The advantage of using names comes from the fact that a name,
like Employees, is more meaningful and less abstract than a
reference like C2:C55.
Function CUBE FUNCTIONS- Cube functions were introduced in Microsoft Excel 2007. They are used with connections to
external SQL data sources and provide analysis tools. Data cubes are multidimensional sets of data that can be
stored in a spreadsheet, providing a means to summarize information from the raw data source.
DATABASE FUNCTIONS- The Database functions perform basic operations, such as Sum, Average, Count, etc.,
and additionally use criteria arguments, that allow you to perform the calculation only for a specified subset of
the records in your Database.
DATE AND TIME FUNCTIONS- Date and time functions operate on a date and time input value and return a
string, numeric, or date and time value.
ENGINEERING FUNCTIONS- perform the most commonly used Engineering calculations, many of which relate to
Bessel functions, complex numbers, or converting between different bases.
FINANCIAL FUNCTIONS- This function is used to calculate the periodic interest rate required to pay off a
provided present value with a provided periodic payment and a total number of payments.
Function
INFORMATION FUNCTIONS- The INFO function is a built-in function in Excel that is categorized as an Information Function. As
Types of a worksheet function, the INFO function can be entered as part of a formula in a cell of a worksheet.
Function LOGICAL FUNCTIONS- Logical functions are used in spreadsheets to test whether a situation is true or false. Depending on the
result of that test, you can then elect to do one thing or another. These decisions can be used to display information, perform
different calculations, or to perform further tests.
MATH AND TRIGONOMETRY FUNCTIONS- perform many of the common mathematical calculations, including basic
arithmetic, conditional sums & products, exponents & logarithms, and the trigonometric ratios. Some more math-related
functions are also discussed in the Statistical functions and Engineering functions categories.
STATISTICAL FUNCTIONS- Statistical functions apply a mathematical process to a group of cells in a worksheet. The SUM
function is used to add the values contained in a range of cells. Functions are more efficient than formulas when you are
applying a mathematical process to a group of cells.
TEXT FUNCTIONS- function lets you change the way a number appears by applying formatting to it with format codes. It's
useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with
text or symbols.
LOOKUP AND REFERENCE- Lookup & Reference functions help you to work with arrays of data, and are particularly useful
when you need to cross reference between different data sets. They perform tasks such as providing information about a
range, returning the location of a given address or value, or looking up specific values.
1. Statistical Functions
•SUM: This function adds all of the values of the cells in the argument.
•AVERAGE: This function determines the average of the values included
in the argument. It calculates the sum of the cells and then divides that
value by the number of cells in the argument.
•COUNT: This function counts the number of cells with numerical data
in the argument. This function is useful for quickly counting items in a
cell range.
•MAX: This function determines the highest cell value included in the
argument.
•MIN: This function determines the lowest cell value included in the
argument.
2. The Logical Functions
•The IF function displays text or values if certain
condition exist. The IF function can perform a
logical test and return one value for a TRUE result,
and another for a FALSE result. Example:
=IF(c5>74,”Passed”,”Failed”)
Arguments:
◦ logical_test - A value or logical expression that can be evaluated as
TRUE or FALSE.
◦ value_if_true - [optional] The value to return when logical_test
evaluates to TRUE.
◦ value_if_false - [optional] The value to return when logical_test
evaluates to FALSE.
The Logical Functions
Formula: =IF (logical test, value if true, value if false)
The And Function
The AND Function will return TRUE if all of its
arguments are true. If one argument is false,
the AND function will return FALSE.
For example, the logical statement 1<10 is true
and the statement 2>1 is also true.
As a result, the compound statement 1<10 AND
2>1 is TRUE, because both of the statements
that are being joined by AND are true.
The following image demonstrates this in Excel
The And Function
A B AND(a, b)
True False False
False True False
True True True
False False False
The OR Function
The OR Function will return TRUE if one or more of the
arguments to the function are true.
For instance, the logical statement 1<10 OR 2<1 is true,
since 1 is less than 10.
It does not matter that the statement 2<1 is false, because
you have a choice of either 1<10 OR 2<1 to make the
compound statement true.
If one or both of the arguments is true, the overall OR
statement will also be true.
The OR Function
A B OR(A,B)
True False True
False True True
True True True
False False False
The NOT Logical
The NOT Logical will return TRUE if he argument is false,
and FALSE if the argument is true;
for example,
=NOT(2+2=1) RETURNS true,
but =NOT(2+2=4) return FALSE.
The IFERROR
•The IFERROR function returns a custom result when a
formula generates an error, and a standard result when no
error is detected.
IFERROR is an elegant way to trap and manage errors
without using more complicated nested IF statements. For
example, =IFERROR(2+2=1,”Error in calculation”) returns
ERROR in calculation.
Arguments:
value - The value, reference, or formula to check for an
error.
value_if_error - The value to return if an error is found.
The IFERROR
Formula: =IFERROR (value, value_if_error)
3. Mathematical Functions and
Trigonometric Functions
Mathematical and trigonometric functions are particularly
useful when you need to determine values such as
logarithms, factorials, and sines.
However, some mathematical operations, such as addition
and subtraction, do not require functions.
3. Mathematical Functions and
Trigonometric Functions
•LN function returns the natural logarithm of a given number.
Arguments:
number - A number to take the natural logarithm of.
Formula: =LN(number)
•SQRT function returns the square root of a positive number. SQRT returns
an error if number is negative.
Arguments:
number - The number to get the square root of.
Formula: =SQRT(number)
3. Mathematical Functions and
Trigonometric Functions
•MODE function returns the most frequently occurring number in a
numeric data set. For example, =MODE(1,2,4,4,5,5,5,6) returns 5.
Arguments:
number1 - A number or cell reference that refers to numeric values.
number2 - [optional] A number or cell reference that refers to numeric
values.
3. Mathematical Functions and
Trigonometric Functions
POWER function returns a number to a given power. The POWER
function works like an exponent in a standard math equation.
Arguments:
number - Number to raise to a power.
power - Exponent to raise power to.
3. Mathematical Functions and
Trigonometric Functions
Formula: =POWER(number, power)
3. Mathematical Functions and
Trigonometric Functions
•EXP function returns the result of the constant e raised to the power of
a number. The constant e is approximately 2.71828, and is the base of
the natural logarithm.
Arguments:
number - The power that
e is raised to.
Formula: =EXP(number)
3. Mathematical Functions and
Trigonometric Functions
•SUMIF is a function to sum cells that meet a single criteria. SUMIF can be
used to sum cells based on dates, numbers, and text that match specific
criteria. SUMIF supports logical operators (>,<,<>,=) and wildcards (*,?) for
partial matching.
Arguments:
range - The range of cells that you want to apply the criteria against.
criteria - The criteria used to determine which cells to add.
sum_range - [optional] The cells to add together. If sum_range is
omitted, the cells in range are added together instead.
Formula: =SUMIF (range, criteria, [sum_range])
3. Mathematical Functions and
Trigonometric Functions
•Formula: =SUMIF (range, criteria, [sum_range])
3. Mathematical Functions and
Trigonometric Functions
•FREQUENCY function returns a frequency distribution, which is a
summary table that shows the frequency of each value in a range.
FREQUENCY returns multiple values and must be entered as an array
formula with control-shift-enter.
Arguments:
data_array - An array of values for which you want to get frequencies.
bins_array - An array of intervals ("bins") for grouping values.
3. Mathematical Functions and
Trigonometric Functions
Formula: =FREQUENCY (data_array, bins_array)
3. Mathematical Functions and
Trigonometric Functions
COUNTIF is a function to count cells that meet a single criteria. COUNTIF
can be used to count cells with dates, numbers, and text that match
specific criteria. The COUNTIF function supports logical operators
(>,<,<>,=) and wildcards (*,?) for partial matching.
Arguments:
range - The range of cells to count.
criteria - The criteria that controls which cells should be counted.
3. Mathematical Functions and
Trigonometric Functions
Formula: =COUNTIF (range, criteria)
3. Mathematical Functions and
Trigonometric Functions
DEVSQ function returns the sum of the squared deviations from the
mean for a given set of data.
Arguments:
number1 - First value or reference.
number2 - [optional] Second value or reference
3. Mathematical Functions and
Trigonometric Functions
Formula: =DEVSQ (number1, [number2], ...)
4. Dates and Times and
Functions
DATE returns a date, from a user supplied year, month and day.
◦ Formula: =DATE(year, month, date)
TIME returns a date, from a user supplied hour, minute and second.
◦ Formula: =TIME(hour, time, second)
DATEVALUE converts a text string showing a date, to an integer that
represents the date in Excel's date-time code. Example:
=DateValue(“05/04/2018”)
◦ Formula: =DATEVALUE(date_text)
TIMEVALUE converts a text string showing a time, to a decimal that
represents the time in Excel. Example: =TimeValue(“11:00 AM”)
returns to 0.375
◦ Formula: =TIMEVALUE(time_text)
4. Dates and Times and
Functions
NOW returns the current date and time based on the computer’s date
and time setting. This function has no arguments.
◦ Formula: =NOW()
TODAY returns today's date on the computer’s date setting. Also, this
function has no arguments.
◦ Formula: =TODAY()
5. Text Function - is a functions that
convert text between Upper and Lower
Case.
LOWER converts all characters in a supplied text string to lower case.
◦ Formula: =LOWER(text)
REPT repeat the text (first argument) in the specified cell a specified
number of times (second argument).
◦ Formula: =REPT(text_number_times)
6. Financial Function
FINANCIAL FUNCTION are useful in personal financial contexts
pertaining to savings and loans, such as the PMT Function.
This PMT(Periodic Payment) Function calculates the periodic payments
required to amortize a loan with a particular interest rate and a set
number of payment periods.
There are Five (5) Arguments associated with the PMT Function,
namely: Rate, Nper, Pv, Fv, and Type.
However, Fv and Type are Optional Arguments, whereas the first
three are Mandatory.
6. Financial Function
NPER - Number of Periods of payments for an investment or loan.
◦ Formula: =NPer(rate, pmt,pv,fv,type)
6. Financial Function
RATE – corresponds to the interest rate per pay period for a loan
◦ Formula: =Rate(nper,pmt,pv,fv,type,guess)
7. LOOKUP FUNCTION
Excel provides two lookup functions that you can use to quickly retrieve
information from data in a table.
The functions are called HLOOKUP (horizontal lookup) and VLOOKUP
(vertical lookup).
VLOOKUP
VLOOKUP is a function to lookup up and retrieve data in a table.
The "V" in VLOOKUP stands for vertical, which means the data in the
table must be arranged vertically, with data in rows.
When it finds the value you specified, it will return a value that is
located in the same row, a specified number of columns into the table.
The arguments for the
VLOOKUP function are:
1. The value you are looking for (lookup_value)
2. The range of cells that make up the table (table_array)
3. The number of the column from which to retrieve a result
(column_index)
4. The match mode (range_lookup, TRUE = approximate, FALSE = exact)
5. For the example shown above, the true or false argument was left
out.
Using VLOOKUP to Find Data
The best way to learn how lookup functions work is to look at an
example. Here we have a table of ticket prices for flights to different
countries. To simplify matters, the data range for the table has been
given a defined name (Price) that can be used in functions and
formulas.
If we activate cell F1 and enter =VLOOKUP("England",Price,2) into the
formula bar, cell F1 will show the value 550.
Using VLOOKUP to Find Data
The vlookup function looked
vertically down the leftmost
column of the lookup table (Price)
until it found a match for the text
string “England.”
The function then returned the
value that is in the second (2)
column of the table, from the row
where the match was found. You
should notice that England, Price,
and 2 are the exact arguments
used in the function.
HLOOKUP
HLOOKUP is similar, but it will look horizontally across the upper row of
your table, and then retrieve data from a column further down.
Since Excel is designed with more cells in the vertical direction than in
the horizontal direction, and because a vertical table design is more
intuitive for most people, VLOOKUP is generally used more often than
HLOOKUP.
How to Find an Exact Match
with VLOOKUP
As mentioned briefly before, the VLOOKUP function can take a final
argument of either TRUE or FALSE.
If you specify this final argument as FALSE, VLOOKUP will search for an
exact match in the lookup column (column of identifiers).
If it cannot find an exact match, no data will be returned with the error
#N/A!
Finding the Closest Match with
VLOOKUP
If the final argument in your VLOOKUP function is TRUE, VLOOKUP will
search the column of identifiers for the closest match to the search
value you enter as the first function argument.
The closest match will be the next lowest value to the search value.
If you omit the final argument in your VLOOKUP function, it will default
to TRUE, and search for a closest value if it cannot find an exact match.
If you are using the TRUE argument, the values in the look up column
should be sorted in ascending order.