0% found this document useful (0 votes)
18 views22 pages

4.misc Handy Formulas

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

4.misc Handy Formulas

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

Excel training session

Key takeaways:

Ú Data formats & related issues


- Dates
- Text
- Numbers

Ú Handy formulas
- Date(), Month(), Year(); Text()
- Edate(), Eomonth()
- Proper(), Lower(), Upper() -
- Trim(), Len()
- T(), N()
- Clean()

Ú Error values
Date Format - Why important ?

1) MM/DD/YY format by Default Settings 12/11/2009

2) Date is a Number - Day(s) from 31 Dec 1899


1/1/1900 2

15-Aug-47 Independence Day


23-Dec-24 Today

28255 Days since independence


77.41 Years since independence (approx.)

End
When you type something like 2/2 in a cell, Excel knows you’re typing a date and formats it based on the date setting in
The date in excel can be given in many ways. Some of the ways and the syntax used for giving dates in various formats is
The date that appears in the excel depends upon the setting given in your system control panel. If you wish to have the d
changes should be made in the control panel

Excel has specific formulas for giving dates and days.


Look at the picture below for reference

How to extract date details ?

We can separate the date into day, month and year in the
following manner
Date =Day() =Month() =Year()
22-Jul-84 22 7 1984
1-Jan-01 1 1 2001

The following list represent the various ways in which a date can be entered in microsoft excel. Excel takes into account
SS for text
Example Date 8/25/1996

Format Description
"dddd" Full weekday like Sunday, Monday etc
"ddd" Half weekday name Sun, Mon, etc.
"dd" Date only in 2 digits lke 25, 08, etc.
"mmmm" Full month name like August, February, etc.
"mmm" Half month name like Jan, Feb, Aug etc.
"mm" Month number in 2 Digits like 08, 12 etc
"yyyy" Full year like 2014, 1996 etc.
"yy" Half year like 14, 96 etc.

Questions for Practice


Date Output format Output Check your answer
10/28/2016 Full weekday Friday right
1/25/2015 Date only in two digits 25 right
5/10/2016 Half year 16 right
7/25/2016 Half month Jan,feb Jul right
5/16/2015 Full month name like August, February, etcMay right
9/6/2014 Full year like 2014, 1996 etc. 2014 right
11/11/2011 Half weekday name Sun, Mon, etc. Fri right

The answer can be checked in the column D after entering the values in column C

End
mats it based on the date setting in Control Panel.
or giving dates in various formats is mentioned below.
ntrol panel. If you wish to have the date in another format

Format_text in pairs of Double-


quotes. E.g. "dddd" or "ddd" or
"dd" or "mmmm" an so on

=Date() =Text()
22-Jul-84 Sunday

osoft excel. Excel takes into account the criteria we specify and formulas that we enter.

/1996

ription Output Format


y, Monday etc Sunday Sunday
, Mon, etc. Sun Click F2 to view the Sun
formula
25, 08, etc. 25 25
ugust, February, etc. August August
n, Feb, Aug etc. Aug Aug
ts like 08, 12 etc 08 08
6 etc. 1996 1996
96 96
Exercise: Sort the dates in ascending order
Isnumber
Use the ISNUMBER function to check if a value is a number. ISNUMBER will return TRUE when value is numer
=ISNUMBER(A1) will return TRUE if A1 contains a number or a formula that returns a numeric value. If A1 co

Date Amt. Rs Validity


5/22/2007 2,990,448 1 ###
5/23/2007 929,259 1 ###
5/24/2007 167,628 1 ###
5/24/2007 1,080,562 1 ###
7/10/2007 31,35,269 0 ###
7/21/2007 1,789,487 1 ###
8/4/2007 2,881,804 1 ###
3/11/2008 2,032,951 1 ###
3/22/2008 1,957,621 1 ###
5/9/2008 1,716,759 1 ###
5/23/2008 5,93,572 0 ###
6/22/2008 1,641,932 1 ###
6/26/2008 1,896,367 1 ###
7/27/2008 2,228,974 1 ###
8/17/2008 2,143,736 1 ###
11/10/2008 1,133,858 1 ###
11/24/2008 402,463 1 ###
11/28/2008 785,753 1 ###
5/12/2009 2,111,134 1 ###
Sort

Sorting is a tool available in excel which helps to arrange the data in the required format.
For.eg. Sorting of data in ascending,descending, alphabetical,largest to smallest and smallest to largest.

This sort & filter


option is available in
the Home Button
End
n TRUE when value is numeric and FALSE when not. For example,
rns a numeric value. If A1 contains text, ISNUMBER will return FALSE.

uired format.
nd smallest to largest.
Important Date formulas
Edate
Get the same date in future or past months
Formula EDATE (start_date, months)

start_date - A date that represents the start date in a valid Excel serial number format.
months - The number of months before or after start_date.
Use EDATE to get the same date in future or past months. For months, use a positive value for future dates and
negative value for dates in the past.

Click F2 in this cell to


view the formula
entered
Start Date months Result
2/1/2014 1 3/1/2014
2/1/2014 -1 1/1/2014
2/15/2013 3 5/15/2013
3/30/2013 -1 2/28/2013
3/30/2013 24 3/30/2015
Note: The date will be in serial number, the format has to be changed to date format to get the require
Eomonth
Get the last day of the month in future or past months
It returns a serial number that represents a particular date in Excel.

=EDATE() =EOMONTH()

2-Jul-10 2-Aug-10 31-Jul-10


12-Feb-12 12-Mar-12 29-Feb-12

7th of next month


Click on the cell or
2-Jul-10 7-Aug-10 press F2 to view the
31-Mar-09 7-Apr-09 formula

Gratuity Due date

2-Feb-08 2-Feb-13 2-Feb-13


12-Sep-04 12-Sep-09

These date formulas are important for calculating the due dates,end dates,previous dates etc.
End
art date in a valid Excel serial number format.
or after start_date.
months. For months, use a positive value for future dates and a

Click F2 in this cell to


view the formula
entered
Notes
One month after
One month before
three months after
We get last date in feb not 30 february
years are automatically incremented
rmat has to be changed to date format to get the required value.

cular date in Excel.

=EOMONTH() Practice

31-Aug-10 Do for next two month 2-Aug-10


31-Dec-11 Do for previous two months 12-Mar-12

Click on the cell or


press F2 to view the 7-Aug-10
formula 7-Apr-09

the due dates,end dates,previous dates etc.


Refer to the following hints and format the text below

Text Formatting Fill the answer

MR. RAMACHANDRAN Mr. Ramachandran Hint: =PROPER()


mr. s.k. sain Mr. S.K. Sain Hint: =PROPER()

state bank of rajasthan State Bank Of Rajasthan Hint: =PROPER()


SONY inc. Sony Inc. Hint: =PROPER()

hsbc Hsbc Hint: =UPPER()

Coca Cola Inc Coca Cola Inc Hint: =TRIM()


HSBC Hsbc Hint: =TRIM()

TeleKnor Inc Teleknor Inc _x000C__x000C__x000C_ _x000C Hint: =CLEAN()

HSBC Hsbc Hint: =LEN()


AKCPN12111 Akcpn12111 Hint: =LEN()
AKCPN12112 Akcpn12112 Hint: =LEN()

End
It converts the text into a proper format
Most commonly used for text formatting

Converts the text in capital


Used for abbreviations

Determines the no. of characters


How to check whether an input is in Text/Number format?
Use the formulas as provided and complete the table
INPUTS =ISTEXT() =ISNUMBER() =ISBLANK() =ISERROR()
Rishabh 1 0 0 FALSE
2,500 0 1 0 FALSE

0 0 1 FALSE
#DIV/0! 0 0 0 TRUE
5,000 0 1 0 FALSE

End
Identify "Number stored as text" to "Number"
`=T(value) To find refered cell is a Text or not
`=N(value) To find refered cell is a Number or not

This helps us to convert number in text format to a numeric value


81,410 81,410
69,611 69,611
81415 81415 0
80,910 80,910
69,810 69,810
80,410 80,410
80,415 80,415
69,490 69,490
67,411 67,411
81540 81540 0
69,460 69,460
68,141 68,141
67,433 67,433
67,413 67,413
66844 66844 0
66790 66790 0
69,616 69,616
66840 66840 0
69,440 69,440
66791 66791 0
69,610 69,610

Note:
Sometimes when data is taken from software, some numbers also appear in text and calculations cannot be ma
The above exercise is useful during data validation where we verify if inputs are in number format or not befor
proceeding with analysis and applying formulas
End
and calculations cannot be made
in number format or not before
Types of Errors in Excel

#NULL! -
#DIV/0! -
#VALUE! -
#REF! -
#NAME? -
#NUM! -
#N/A -

End
Types of Errors in Excel

Arises when you specify an intersection of two ranges that don't intersect #REF!
Your formula is attempting to divide by zero #DIV/0!
One of the variables in your formula is of the wrong type Err:502
The formula contains an invalid cell reference #REF!
Excel doesn't recognise text in a formula #NAME?
Excel has encountered an invalid number Err:523
Indicates that a value is not available to the formula #N/A
###
Illustration ###

Excel Spread sheet 0


Chrome Browser 1
KasperskyAnti Virus

UC Browser

10 120 -100 50 60

###

###

###### Error

You might also like