Excel Basic Functions3
Excel Basic Functions3
To enter a date in Excel, use the "/" or "-" characters. To enter a time, use the ":" (colon). You can also
enter a date and a time in one cell.
Note: Dates are in US Format. Months first, Days second. This type of format depends on your
Windows regional settings.
Note: use the MONTH function and the DAY function to get the month and day of a date.
DATE function
To add a number of years, months and/or days, use the DATE function.
Note: the DATE function accepts three arguments: year, month and day. Excel knows that 6 + 2 = 8 =
August has 31 days and rolls over to the next month (23 August + 9 days = 1 September).
Note: use the MINUTE function and the SECOND function to return the minute and second.
TIME function
To add a number of hours, minutes and/or seconds, use the TIME function.
Join Strings
To join strings, use the & operator.
Note: instead of using the & operator, use the CONCATENATE function in Excel.
LEFT
To extract the leftmost characters from a string, use the LEFT function.
RIGHT
To extract the rightmost characters from a string, use the RIGHT function.
MID
To extract a substring, starting in the middle of a string, use the MID function.
LEN
FIND
SUBSTITUTE
To replace existing text with new text in a string, use the SUBSTITUTE function.
VLOOKUP
The VLOOKUP (Vertical lookup) function looks for a value in the leftmost column of a table, and then
returns a value in the same row from another column you specify.
xplanation: the VLOOKUP function looks for the ID (104) in the leftmost column of the range
$E$4:$G$7 and returns the value in the same row from the third column (third argument is set to 3).
The fourth argument is set to FALSE to return an exact match or a #N/A error if not found.
HLOOKUP
In a similar way, you can use the HLOOKUP (Horizontal lookup) function.
Note: if you have Excel 365 or Excel 2021, you can also use XLOOKUP to perform a horizontal lookup.
MATCH
INDEX
Explanation: 92 found at the intersection of row 3 and column 2 in the range E4:F7.
CHOOSE
The CHOOSE function returns a value from a list of values, based on a position number.
To illustrate Excel's most popular financial functions, we consider a loan with monthly payments, an
annual interest rate of 6%, a 20-year duration, a present value of $150,000 (amount borrowed) and a
future value of 0 (that's what you hope to achieve when you pay off a loan).
We make monthly payments, so we use 6%/12 = 0.5% for Rate and 20*12 = 240 for Nper (total
number of periods). If we make annual payments on the same loan, we use 6% for Rate and 20 for
Nper.
PMT
Note: the last two arguments are optional. For loans, Fv can be omitted (the future value of a loan
equals 0, however, it's included here for clarification). If Type is omitted, it is assumed that payments
are due at the end of the period.
RATE
If Rate is the only unknown variable, we can use the RATE function to calculate the interest rate.
NPER
Or the NPER function. If we make monthly payments of $1,074.65 on a 20-year loan, with an annual
interest rate of 6%, it takes 240 months to pay off this loan.
We already knew this, but we can change the monthly payment now to see how this affects the total
number of periods.
Conclusion: if we make monthly payments of $2,074.65, it takes less than 90 months to pay off this
loan.
PV
Or the PV (Present Value) function. If we make monthly payments of $1,074.65 on a 20-year loan,
with an annual interest rate of 6%, how much can we borrow? You already know the answer.
FV
And we finish this chapter with the FV (Future Value) function. If we make monthly payments of
$1,074.65 on a 20-year loan, with an annual interest rate of 6%, do we pay off this loan? Yes.
But, if we make monthly payments of only $1,000.00, we still have debt after 20 years.
This chapter gives an overview of some very useful statistical functions in Excel.
AVERAGE
AVERAGEIF
To average cells based on one criteria, use the AVERAGEIF function. For example, to calculate the
average excluding zeros.
Note: visit our page about the AVERAGEIF function for many more examples.
MEDIAN
To find the median (or middle number), use the MEDIAN function.
Check:
MODE
To find the most frequently occurring number, use the MODE function.
Note: visit our page about the MODE function to learn more about this Excel function.
Standard Deviation
To calculate the standard deviation, use the STDEV function.
Note: standard deviation is a number that tells you how far numbers are from their mean. Learn
more about this topic on our page about standard deviation.
MIN
MAX
LARGE
To find the third largest number, use the following LARGE function.
Check:
SMALL
To find the second smallest number, use the following SMALL function.
Check:
ROUND function
The ROUND function in Excel rounds a number to a specified number of digits. The ROUND function
rounds up or down. 1, 2, 3 and 4 get rounded down. 5, 6, 7, 8 and 9 get rounded up.
Note: 114.7261, 114.7262, 114.7263 and 114.7264 get rounded down to 114.726 and 114.7265,
114.7266, 114.7267, 114.7268 and 114.7269 get rounded up to 114.727.
ROUNDUP function
The ROUNDUP function in Excel always rounds a number up (away from zero). 1, 2, 3, 4, 5, 6, 7, 8 and
9 get rounded up.
Note: 114.7261, 114.7262, 114.7263, 114.7264, 114.7265, 114.7266, 114.7267, 114.7268 and
114.7269 get rounded up to 114.727.
Note: remember, the ROUNDUP function rounds a number up (away from zero).
Note: again, the ROUNDUP function rounds a number up (away from zero).
ROUNDDOWN function
The ROUNDDOWN function in Excel always rounds a number down (toward zero). 1, 2, 3, 4, 5, 6, 7, 8
and 9 get rounded down.
Note: 114.7261, 114.7262, 114.7263, 114.7264, 114.7265, 114.7266, 114.7267, 114.7268 and
114.7269 get rounded down to 114.726.
Note: again, the ROUNDDOWN function rounds a number down (toward zero).
Finally, if you round a number, you lose precision. If you don't want this, show fewer decimal places
without changing the number itself.
2. Use the Decrease Decimal button on the Home tab to show fewer decimal places in Excel.
Result:
Note: the formula bar shows that cell A1 still contains the value 2.175.
Formula Errors in Excel::
#####
When your cell contains this error code, the column isn't wide enough to display the value.
Click on the right border of the column A header and increase the column width.
Tip: double click the right border of the column A header to automatically fit the widest entry in
column A.
#NAME?
The #NAME? error occurs when Excel does not recognize text in a formula.
Excel displays the #VALUE! error when a formula has the wrong type of argument.
#DIV/0!
Excel displays the #DIV/0! error when a formula tries to divide a number by 0 or an empty cell.
#REF!
Excel displays the #REF! error when a formula refers to a cell that is not valid.
2. Delete column B. To achieve this, right click the column B header and click Delete.
#N/A
The #N/A error appears when the VLOOKUP function (or XLOOKUP, MATCH, etc.) can't find a match.
2. Use the IFNA function to replace the #N/A error with a friendly message.
#NUM!
Excel shows the #NUM! error when a formula contains invalid numeric values.
1. For example, the SQRT function below cannot calculate the square root of a negative number.
2. Change the number in cell A1 to a positive number.
#NULL!
The intersect operator (single space) returns the intersection of two ranges. When two ranges don't
intersect, Excel displays the #NULL! error.
1. The formula below returns #NULL! because the two ranges don't intersect.
#SPILL!
Note: this dynamic array function, entered into cell C1, fills multiple cells. Wow! This behavior in
Excel 365/2021 is called spilling.