functions in Excel
functions in Excel
DATEVALUE( ): Gives serial number for given date-text. Date-text means date in quotes.
=DATEVALUE("1-Jan-1900") → 1
=DATEVALUE("1-Feb-1900") → 32
DAY( ): Gives day of the month for the given serial number or date-text.
=DAY (“25-Dec-2009”) → 25
=DAY (“12/27/2009”) → 27
MONTH( ): Gives month of the year for the given serial number or date-text. Answer of the function is
numeric.
=MONTH (“25-Dec-2009”) → 12
=MONTH (“12/27/2009”) → 12
YEAR( ): Gives year for the given serial number or date-text. Answer of the function is numeric and it is always
4 digits.
=YEAR (“25-Dec-2009”) → 2009
=YEAR (“12/27/2009”) → 2009
WEEKDAY( ): Gives day of the week for th given serial number or date-text. Answer of the function is numeric.
If return type is omitted or 1 then Sunday = 1, Monday = 2…...Saturday = 7.
=WEEKDAY (“31-Dec-2006”) → 1
=WEEKDAY (“12/30/2006”) → 7
DAYS360( ): Gives you number of days between two given dates based on an assumption that there are 360
days in a year i.e. 12 months of 30 days.
=DAYS360 (“1-Dec-2004”,”1-Jan-2005”) → 30
=DAYS360 (“1-Dec-2004”,”1-Dec-2005”) → 360
TIME( ): Gives time in hh:mm AM/PM form (12 Hour) for given time. You have to give the time as per 24 hour
clock with hh,mm,ss.
=TIME(18,30,45) → 6:30 PM
=TIME(12,0,0) → 12:00 PM
TIMEVALUE( ): This function is used to get serial number for time-text. Time text means time in quotes.
=TIMEVALUE(“6:00 PM”) → 0.75
=TIMEVALUE(“18:00”) → 0.75
TODAY( ): This fuction is used to get current date. Genrally date will be in American Format.
Assuming today is 27th June, 2009=TODAY( ) → 6/27/2009
NOW( ): This function is used to get current date as well as current time. Genrally date will be in American
format (mm/dd/yyyy) and time as per 24 hours clock.
Assuming today is 27th June, 2009 and time is 6:30 in the evening.
=NOW( ) → 6/27/2009 18:30
TEXT FUNCTIONS
LEFT( ): This function is used to find charecters from left side of the string. By default it gives one character
from the left side.
=LEFT(“FLOPPY DISK”,4) → FLOP
=LEFT(“FLOPPY DISK”) → F
RIGHT( ): This function is used to find charecters from right side of the string. By default it gives one character
from the right side.
=RIGHT(“FLOPPY DISK”,4) → DISK
=RIGHT(“FLOPPY DISK”) → K
MID( ): This function is used to find charecters from middle of the string starting from mth character and gives
n number of charecters.
=MID(“FLOPPY DISK:,2,3) → LOP
=MID(“FLOPPY DISK:,3,2) → OP
PROPER( ): It is used to capitalise the first alphabet in the text that follows any non-alphabetic character;
converts all other alphabets into lowercase.
=PROPER(“THIS IS EXCEL”) → This Is Excel
=PROPER(“2-cent’s worth”) → 2-Cent’S Worth
TRIM( ): This function is used to remove all the blank spaces except single blank spaces between two words.
=TRIM(“ THIS IS EXCEL ”) → THIS IS EXCEL
FIXED( ): This function is used to round a number to the specified number of decimals, formats the number in
decimal format using a period and commas, and returns the result as text. By default number of decimals are
two and no_commas is FALSE.
=FIXED(1333.3333,2) → 1,333.33
=FIXED(33.3333,1) → 33.3
MATHS FUNCTIONS
SUM( ): Adds all the number in a range of cells. If there is a text entry in the range then it will be ignored but if
text is given as an argument then it will give an error.
=SUM(A2:A4) → 15000
=SUM(A2:A4,3000) → 18000
SUMIF( ): Adds all the number in a range of cells for which given condition is true. If sum_range (second
range) is given then values from sum_range are added otherwise values from range (first range) are added
where the given condition is true.
To take the total of NET where BASIC is above 3,500; the formula will be:
=SUMIF(B2:B5.”>3500”,E2:E5) → 9630
STATISTICAL FUNCTIONS
AVERAGEIF( ): This function is used to find average of all the numbers in a range of cells for which given
condition is true. If average_range (second range) is given then values from average_range are considered
otherwise values from range (first range) are considered where the given conditionis true.
To take the average of NET where BASIC is above 3,500; the formula will be:
=AVERAGEIF(D2:D5,”>3500”,E2:E5) → 4815
COUNT( ): Count the number f cells that contains numbers. Remember Date annd Time is treated as number.
If there is a text entry in the range or as an argument then it will not give an error.
=COUNT(A1:A4) → 3
=COUNT(A2:A4) → 3
COUNTA( ): Counts the number of cells that are not empty. If there is a text entry in the range or as an
argument then it will not give an error.
=COUNTA(A1:A7) → 6
=COUNTA(A1:A5) → 5
COUNTBLANK( ): Counts the number of cells that are not empty. If there is a text entry in the range or as an
argument then it will not give an error.
=COUNTBLANK(A1:A7) → 1
=COUNTBLANK(A1:A5) → 0
COUNTIF( ): Counts the number of cells that are not empty. If there is a text entry in the range or as an
argument then it will not give an error.
=COUNTIF(A2:A5,“A”) → 2
=COUNTIF(B2:B5, “>2000”) → 5
LARGE( ): This function is the Kth largest value in a data set. You can use this function to select a value based
on its relative standing. For example, you can use LARGE to return the highest, runner-up, or third-place value.
=LARGE(A2:A6,1) → 21
=LARGE(A2:A6,3) → 18
SMALL( ): This function is the Kth smallest value in a data set. You can use this function to select a value based
on its relative standing. For example, you can use LARGE to return the lowest, second-lowest, or third-lowest
value.
=SMALL(A2:A6,1) → 15
=SMALL(A2:A6,3) → 18
CORREL( ): This function returns the correlation coefficient of the array1 and array2 cell ranges. Use the
correlation coefficient to determine the relationship between two properties. For example, you can examine
the relationship between a location’s average temperature and the use of air conditioners.
=CORREL(A2:A6,B2:B6) → 0.725907953
LOGICAL FUNCTION
IF( ): This function is used to check a condition, if a condition is true part of IF is solved otherwise false part of
IF is solved.
=IF(B2>3500,B2*10%,B2*12%)
=IF(B2,<=4000,B2*9%,B2*11%)
AND( ): This function is used to combine two or more conditions. If all the conditions are true then it will
return True otherwise False.
=AND(B2>500,B3>3000) → TRUE
=AND(B2>800,B3 = 4000,B4<6000) → TRUE
OR( ): This function is used to combine two or more conditions.If any one condition is true then it will return
True otherwise False.
=OR(B2>500,B3>3000)