0% found this document useful (0 votes)
2 views

Excel Basic Functions3

Uploaded by

sunildesai7786
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)
2 views

Excel Basic Functions3

Uploaded by

sunildesai7786
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/ 23

Date & Time Functions in Excel

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.

YEAR, MONTH, DAY

To get the year of a date, use the YEAR function.

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 days to a date, use the following simple formula.

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).

Current Date & Time


To get the current date and time, use the NOW function.

Note: use the TODAY function to enter today's date in Excel.

HOUR, MINUTE, SECOND

To return the hour, use the HOUR function.

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.

Note: Excel adds 2 hours, 10 + 1 = 11 minutes and 70 - 60 = 10 seconds.

Text Functions in Excel

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.

Note: started at position 5 (p) with length 3.

LEN

To get the length of a string, use the LEN function.

Note: space (position 8) included!

FIND

To find the position of a substring in a string, use the FIND function.


Note: string "am" found at position 3. Visit our page about the FIND function for more examples.

SUBSTITUTE

To replace existing text with new text in a string, use the SUBSTITUTE function.

Lookup & Reference Functions in Excel

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.

1. Insert the VLOOKUP function shown below.

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.

2. Drag the VLOOKUP function in cell B2 down to cell B11.


Note: when we drag the VLOOKUP function down, the absolute reference ($E$4:$G$7) stays the
same, while the relative reference (A2) changes to A3, A4, A5, etc. Visit our page about the VLOOKUP
function for much more information and many examples.

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

The MATCH function returns the position of a value in a given range.


Explanation: Yellow found at position 3 in the range E4:E7. The third argument is optional. Set this
argument to 0 to return the position of the value that is exactly equal to lookup_value (A2) or a #N/A
error if not found. Use INDEX and MATCH in Excel and impress your boss.

INDEX

The INDEX function below returns a specific value in a two-dimensional range.

Explanation: 92 found at the intersection of row 3 and column 2 in the range E4:F7.

The INDEX function below returns a specific value in a one-dimensional range.


Explanation: 97 found at position 3 in the range E4:E7. Use INDEX and MATCH in Excel and impress
your boss.

CHOOSE

The CHOOSE function returns a value from a list of values, based on a position number.

Explanation: Boat found at position 3.

Financial Functions in Excel

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

Select cell A2 and insert the PMT function.

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.

Result: the monthly payment equals $1,074.65.


Tip: when working with financial functions in Excel, always ask yourself the question, am I making a
payment (negative) or am I receiving money (positive)? We pay off a loan of $150,000 (positive, we
received that amount) and we make monthly payments of $1,074.65 (negative, we pay). Visit our
page about the PMT function for many more examples.

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

To calculate the average of a group of numbers, use the AVERAGE function.

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

To find the minimum value, use the MIN function.

MAX

To find the maximum value, use the MAX function.

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.

1. For example, round a number to three decimal places.

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.

2. Round a number to two decimal places.

3. Round a number to one decimal place.


4. Round a number to the nearest integer.

5. Round a number to the nearest 10.

6. Round a number to the nearest 100.

7. Round a number to the nearest 1000.

8. Round a negative number to one decimal place.

9. Round a negative number to the nearest integer.

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.

1. For example, round a number up to three decimal places.

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.

2. Round a number up to two decimal places.

3. Round a number up to one decimal place.

4. Round a number up to the nearest integer.

5. Round a number up to the nearest 10.

6. Round a number up to the nearest 100.


7. Round a number up to the nearest 1000.

8. Round a negative number up to one decimal place.

Note: remember, the ROUNDUP function rounds a number up (away from zero).

9. Round a negative number up to the nearest integer.

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.

1. For example, round a number down to three decimal places.

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.

2. Round a number down to two decimal places.


3. Round a number down to one decimal place.

4. Round a number down to the nearest integer.

5. Round a number down to the nearest 10.

6. Round a number down to the nearest 100.

7. Round a number down to the nearest 1000.

8. Round a negative number down to one decimal place.


Note: remember, the ROUNDDOWN function rounds a number down (toward zero).

9. Round a negative number down to the nearest integer.

Note: again, the ROUNDDOWN function rounds a number down (toward zero).

Show Fewer Decimals Without Rounding

Finally, if you round a number, you lose precision. If you don't want this, show fewer decimal places
without changing the number itself.

1. For example, enter the value 2.175 into cell A1.

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.

1. Simply correct SU to SUM.


#VALUE!

Excel displays the #VALUE! error when a formula has the wrong type of argument.

1a. Change the value of cell A3 to a number.


1b. Use a function to ignore cells that contain text.

#DIV/0!

Excel displays the #DIV/0! error when a formula tries to divide a number by 0 or an empty cell.

1a. Change the value of cell A2 to a value that is not equal to 0.


1b. Prevent the error from being displayed by using the logical function IF.
Explanation: if cell A2 equals 0, an empty string ("") is displayed. If not, the result of the formula
A1/A2 is displayed.

#REF!

Excel displays the #REF! error when a formula refers to a cell that is not valid.

1. Cell C1 references cell A1 and cell B1.

2. Delete column B. To achieve this, right click the column B header and click Delete.

3. Select cell B1. The reference to cell B1 is not valid anymore.


4. To fix this error, you can either delete +#REF! in the formula of cell B1 or you can undo your action
by pressing CTRL + z

#N/A

The #N/A error appears when the VLOOKUP function (or XLOOKUP, MATCH, etc.) can't find a match.

1. In the example below, ID 28 cannot be found.

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.

2. The formula below doesn't return the #NULL error.

Note: =SUM(F2:G2) produces the exact same result!

#SPILL!

If something is blocking a spill range, Excel displays the #SPILL! error.


1. Simply empty cell C6 to fix the #SPILL error.

Note: this dynamic array function, entered into cell C1, fills multiple cells. Wow! This behavior in
Excel 365/2021 is called spilling.

You might also like