Uploaded by shahla ahmadova

excelfunctions-this-a-list-of-the-various-ms-excel-functions-that-can-be-covered-at-as-level

advertisement
lOMoARcPSD|4799749
Excelfunctions - This a list of the various Ms Excel functions
that can be covered at AS level
Ict a level (The Chancellor, Masters, and Scholars of the University of Cambridge)
StuDocu is not sponsored or endorsed by any college or university
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
Al Waha International School
9626 – Spreadsheet Functions
String Functions
=B2&C2
=CONCATENATE(B2,C2)
=B2&” “&C2
=CONCATENATE(B2,” “,C2)
=C2&”, “&B2
=CONCATENATE(C2,”,
“,B2)
=LEFT(A2,1)(Eg:SCHOOL)
=LEFT(A2,2)
RituAfana
Ritu Afana
Afana, Ritu
S
SC
=LEFT(A2,4)
SCHO
=RIGHT(A2,1)
L
=RIGHT(A2,2)
OL
=RIGHT(A2,4)
HOOL
=MID(A2,3,1)
H
=MID(A2,3,4)
HOOL
=MID(A2,5,2)
OL
=LEN(A2)
6
FIND(find_text,
within_text, [start_num])
=FIND("M",”Miriam”)
=EXACT(text1, text2)
Word word
Joins two cell contents where value
returned with no space in between
To add a space between two
strings
Add a space and a comma between
two strings
Extracts left most character from
the string
Extracts two characters from the
left
Extracts four characters from the
left.
Extracts right most character from
the string.
Extracts the right two characters
from the string
Extracts the right four characters
from the string
Extracts the third character from
the string
Extracts four characters from the
string starting at the third
character
Extracts two characters from the
string starting at the fifth character
Counts the number of characters in
the cell.
The LEN function simply counts all
characters that appear in a cell. All
characters are counted, including
space characters. Numbers are also
counted in their raw form (i.e.
number formatting is not included)
FIND locate one text string within a
second text string, and return the
number of the starting position of
the first text string from the first
character of the second text string.
It is case sensitive and don't allow
wildcard characters. If find_text is
"" (empty text), FIND matches the
first character in the search string
Compares two text strings and
returns TRUE if they are exactly the
Page 1 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=FIXED(number,
[decimals], [no_commas])
=FIXED(1234.567, 1) =
1,234.6
=FIXED(1234.567, -1) =
1,230
=FIXED(A3, -1, TRUE) =
-1230
=FIXED(44.332) =
44.33
=LOWER(text)
=LOWER(“E. E. Cummings”)
= e. e. cummings
=UPPER(text)
=PROPER(text)
=UPPER(total) = TOTAL
=PROPER(“this is a TITLE”)
= This Is A Title
=REPLACE(old_text,
start_num, num_chars,
new_text)
=REPLACE(“abcdefghijk”,6,5
,"*") =abcde*k
(Replaces five characters in
abcdefghijk with a single *
character, starting with the
sixth character (f)).
SEARCH(find_text,within_
text,[start_num])
=SEARCH("e",”
Statements”,6)
=REPT(text,
number_times)
= SUBSTITUTE(text,
old_text, new_text,
[instance_num])
=REPT("*-", 3) = *-*-*-
=SUBSTITUTE(A2, "Sales",
"Cost") = Cost Data
same, FALSE otherwise. EXACT is
case-sensitive but ignores
formatting differences. In this
example, Excel returns False as W
is capital in the first text.
Rounds 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. If decimals is
negative, number is rounded to the
left of the decimal point. If you
omit decimals, it is assumed to be
2. If no_commas is FALSE or
omitted, then the returned text
includes commas as usual.
Converts all uppercase letters in a
text string to lowercase. LOWER
does not change characters in text
that are not letters.
Converts text to uppercase.
Capitalizes the first letter in a text
string and any other letters in text
that follow any character other
than a letter. Converts all other
letters to lowercase letters.
REPLACE replaces part of a text
string, based on the number of
characters you specify, with a
different text string.
The SEARCH functions locate one
text string within a second text
string, and return the number of
the starting position of the first
text string from the first character
of the second text string.
Repeats text a given number of
times
Substitutes new_text for old_text
in a text string. Use SUBSTITUTE
when you want to replace specific
text in a text string; use REPLACE
when you want to replace any text
that occurs in a specific location in
a text string.
Page 2 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=TEXT(Value you want to
format, "Format code you
want to apply")
=TRIM(text)
=TEXT(TODAY(),"MM/DD/Y
Y")
(Today’s date in MM/DD/YY
format, like 03/14/12)
=TRIM(“ First Quarter
Earnings “) Removes
leading and trailing spaces
from the text in the
formula
=VALUE(text)
=VALUE("$1,000")
(Number equivalent of the
text string "$1,000")
The TEXT 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.
Removes all spaces from text
except for single spaces between
words.
Converts a text string that
represents a number to a number.
Text can be in any of the constant
number, date, or time formats
recognized by Microsoft Excel. If
text is not in one of these formats,
VALUE returns the #VALUE! error
value
Math Functions
=INT(number)
=MOD(number,
divisor)
=INT(8.9) = 8
=INT(-8.9) = 9
(Rounds -8.9 down. Rounding a
negative number down rounds
it away from 0)
=MOD(3, 2) = 1 (Remainder of
3/2)
=RAND()
=RAND()*100
A random number greater than
or equal to 0 and less than 100
Rounds a number down to the
nearest integer.
Returns the remainder after
number is divided by divisor. The
result has the same sign as
divisor.
RAND returns an evenly
distributed random real number
greater than or equal to 0 and
less than 1. A new random real
number is returned every time
the worksheet is calculated.
To generate a random real
number between a and b, use:
=RAND()*(b-a)+a
If you want to use RAND to
Page 3 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=RANDBETWEEN(bott
om, top)
=RANDBETWEEN(1,100)
(Random number between 1
and 100 (varies))
=ROUND(number,
num_digits)
=ROUND(2.15, 1) =2.2
=ROUNDDOWN(numb
er, num_digits)
=ROUNDUP(number,
num_digits)
=SUBTOTAL(function_
num,ref1,[ref2],...)
=ROUNDDOWN(76.9,0) = 76
=Sum(val1,val2)
=Sumif(range,criteria,s
umrange)
=SUMIFS(sum_range,
criteria_range1,
criteria1,
[criteria_range2,
criteria2], ...)
=ROUNDUP(3.2,0) =4
=SUBTOTAL(9,A2:A5)
(The sum of the subtotal of the
cells A2:A5)
=SUM(A2:A10)
=SUMIF(B2:B5, "John", C2:C5)
(sums only the values in the
range C2:C5, where the
corresponding cells in the range
B2:B5 equal "John.")
=SUMIFS(A2:A9,B2:B9,"<>Banan
as",C2:C9,"Tom")
generate a random number but
don't want the numbers to
change every time the cell is
calculated, you can enter
=RAND() in the formula bar, and
then press F9 to change the
formula to a random number. The
formula will calculate and leave
you with just a value.
Returns a random integer
number between the numbers
you specify. A new random
integer number is returned every
time the worksheet is calculated.
The ROUND function rounds a
number to a specified number of
digits.
Rounds a number down, toward
zero.
Rounds a number up, away from
0 (zero).
Returns a subtotal in a list or
database.
The SUM function adds values.
You can add individual values, cell
references or ranges or a mix of
all three.
You use the SUMIF function to
sum the values in a range that
meet criteria that you specify.
The SUMIFS function adds all of
its arguments that meet multiple
criteria.
Date and Time Functions
Page 4 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=DATE(year,month,day)
=DATE(2009,12,21) =
21/12/2009
=YEAR(serial_number)
=YEAR(7/5/2008) = 2008
=MONTH(serial_number)
=MONTH(15-Apr-11) = 4
(Month of the date in cell
A2)
=DAY(serial_number)
=DAY(15-Apr-11) = 15
=DATEDIF(start_date,end_date
,unit)
Start Date=1/1/2001
End Date=1/1/2003
DATE function when you need
to take three separate values
and combine them to form a
date.
Returns the year corresponding
to a date. The year is returned
as an integer in the range 19009999.
Returns the month of a date
represented by a serial number.
The month is given as an
integer, ranging from 1
(January) to 12 (December).
Returns the day of a date,
represented by a serial number.
The day is given as an integer
ranging from 1 to 31.
Calculates the number of days,
months, or years between two
dates.
=DATEDIF(Start_date,End
_date,"Y")
=DAYS(end_date, start_date)
=DAYS360(start_date,end_dat
e,[method])
=EDATE(start_date, months)
Two complete years in
the period (2)
=DAYS("3/15/11","2/1/11
") = 42
=DAYS360(“1/30/2011”,”
2/1/2011”)
(The date, one month
before the date above)
Returns the number of days
between two dates.
The DAYS360 function returns
the number of days between
two dates based on a 360-day
year (twelve 30-day months),
which is used in some
accounting calculations.
Returns the serial number that
represents the date that is the
indicated number of months
before or after a specified date
(the start_date). Use EDATE to
calculate maturity dates or due
dates that fall on the same day
of the month as the date of
issue.
=EOMONTH(“1-Jan-11”,1)
= 2/28/2011
Returns the serial number for
the last day of the month that is
=EDATE(A2,1) = 15-Feb-11
(The date, one month
after the date above)
=EDATE(A2,-1) = 15-Dec10
=EOMONTH(start_date,
months)
Page 5 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
Date of the last day of the
month, one month after
the given date
=HOUR(serial_number)
=HOUR(7/18/2011 7:45)
=7
(Returns the hour portion
of the date/time value.)
=MINUTE(serial_number)
=MINUTE(12:45:00
PM) = 45
the indicated number of
months before or after
start_date. Use EOMONTH to
calculate maturity dates or due
dates that fall on the last day of
the month.
Returns the hour of a time
value. The hour is given as an
integer, ranging from 0 (12:00
A.M.) to 23 (11:00 P.M.).
Returns the minutes of a time
value. The minute is given as an
integer, ranging from 0 to 59.
(Minute portion of the
given time.)
=SECOND(serial_number)
=SECOND(4:48:18 PM) =
18
=SECOND(4:48 PM) = 0
=TIME(hour, minute, second)
=TIME(12,0,0) =0.5
=NOW()
=NOW() (Returns the
current date and time.)
=NETWORKDAYS(start_date,
end_date, [holidays])
= TODAY()
=NOW()-0.5 (Returns the
date and time 12 hours
ago (-0.5 days ago).)
=NETWORKDAYS(10/1/20
12, 3/1/2013,
11/22/2012) = 109
(Number of workdays
between the start
(10/1/2012) and end date
(3/1/2013), with the
11/22/2012 holiday as a
non-working day.)
= YEAR( TODAY())-1963
(This formula uses the
TODAY function as an
argument for the YEAR
function to obtain the
Returns the seconds of a time
value. The second is given as an
integer in the range 0 (zero) to
59.
Returns the decimal number for
a particular time.
Returns the serial number of
the current date and time.
Returns the number of whole
working days between
start_date and end_date.
Working days exclude weekends
and any dates identified in
holidays. Use NETWORKDAYS to
calculate employee benefits
that accrue based on the
number of days worked during
a specific term.
Returns the serial number of
the current date
Page 6 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=WEEKDAY(serial_number,
[return_type])
=WEEKNUM(serial_number,
[return_type])
=WORKDAY(start_date, days,
[holidays])
=YEARFRAC(start_date,
end_date, [basis])
current year, and then
subtracts 1963, returning
the person's age.)
=WEEKDAY(2/14/2008) =
5
=WEEKNUM(3/9/2012) =
10
(Number of the week in
the year that 3/9/2012
occurs, based on weeks
beginning on Sunday
(default).)
=WORKDAY(10/1/2008,15
1) =
4/30/2009
=YEARFRAC(1/1/2012,
7/30/2012) = 0.58055556
(Fraction of the year
between 1/1/2012 and
7/30/12, omitting the
Basis argument.)
Returns the day of the week
corresponding to a date. The
day is given as an integer,
ranging from 1 (Sunday) to 7
(Saturday), by default.
Returns the week number of a
specific date. For example, the
week containing January 1 is
the first week of the year, and is
numbered week 1.
Returns a number that
represents a date that is the
indicated number of working
days before or after a date (the
starting date). Working days
exclude weekends and any
dates identified as holidays. Use
WORKDAY to exclude weekends
or holidays when you calculate
invoice due dates, expected
delivery times, or the number
of days of work performed.
YEARFRAC calculates the
fraction of the year represented
by the number of whole days
between two dates (the
start_date and the end_date).
Logical Functions
=AND(condition1,condition2,…) =AND(A2>1,A2<100)
(Displays TRUE if A2 is
greater than 1 AND less
than 100, otherwise it
displays FALSE.)
=OR(condition1,condition2,…)
=OR(A2>1,A2<100)
(Displays TRUE if A2 is
greater than 1 OR less
Use the AND function,
one of the logical
functions, to
determine if all
conditions in a test are
TRUE.
to determine if any
conditions in a test are
TRUE.
Page 7 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
than 100, otherwise it
displays FALSE.)
=NOT(A2>100)
(A2 is NOT greater than
100)
=NOT(condition1)
=IF( condition, value_if_true,
[value_if_false] )
=IF(E7=”Yes”,F5*0.0825,0)
(In this example, the
formula in F7 is saying
IF(E7 = “Yes”, then
calculate the Total Amount
in F5 * 8.25%, otherwise
no Sales Tax is due so
return 0))
Use the NOT function,
when you want to
make sure one value is
not equal to another.
The IF function is one
of the most popular
functions in Excel, and
it allows you to make
logical comparisons
between a value and
what you expect.
So an IF statement can
have two results. The
first result is if your
comparison is True,
the second if your
comparison is False.
LOOKUP FUNCTIONS
=LOOKUP(lookup_value,
lookup_vector,
[result_vector])
=LOOKUP(4.19, A2:A6, B2:B6)
(Looks up 4.19 in column A, and
returns the value from column B
that is in the same row.)
=VLOOKUP (value, table,
col_index,
[range_lookup])
=VLOOKUP(C5,$G$5:$H$10,2,TRUE)
LOOKUP looks in a
one-row or onecolumn range
(known as a vector)
for a value and
returns a value
from the same
position in a second
one-row or onecolumn range.
Use VLOOKUP, one
of the lookup and
reference functions,
when you need to
find things in a
table or a range by
row. VLOOKUP only
looks right.
VLOOKUP retrieves
data based on
Page 8 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
=HLOOKUP( lookup_valu
e, table_array,
row_index_num,
[range_lookup] )
==HLOOKUP("Axles", A1:C4, 2,
TRUE)
(Looks up "Axles" in row 1, and
returns the value from row 2 that's
in the same column (column A).)
=MATCH( lookup_value,
lookup_array,
[match_type] )
=MATCH( "aaaa", A1:A5, 0 )
(Returns the position of “aaaa” in
A1:A5)
=INDEX( array, row_num,
[col_num] )
=INDEX(A2:B3,2,2)
(Value at the intersection of the
second row and second column in
the range A2:B3.)
column number.
your data must be
sorted in ascending
order by lookup
value when you use
approximate match
mode with
VLOOKUP.
The Excel Hlookup
function 'looks up' a
given value in the
top row of a data
array (or table), and
returns the
corresponding
value from another
row of the array.
In text-related
Hlookups, when the
[match_type]
argument is set to
0, the lookup_value
can contain the
following wildcard
characters:
? - matches any
single character
* - matches any
sequence of
characters
The Excel Match
function looks up a
value in an array,
and returns the
position of the
value within the
array.
The Excel Index
function returns a
reference to a cell
that lies in a
specified row and
column of a range
Page 9 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
lOMoARcPSD|4799749
of cells.
Index Function Errors
If you get an error from the Excel Index function this is likely to be one of the following:
Common Errors
#REF! Occurs if either:
The supplied row_num argument is greater than the number of rows in the supplied range;
The supplied [col_num] argument is greater than the number of columns in the supplied range;
The supplied [area_num] argument is greater than the number of areas in the supplied range.
#VALUE!
Occurs if any of the supplied row_num, [col_num] or [area_num]
arguments are non-numeric.
Excel Hlookup or Vlookup Function Errors
If you get an error from the Excel Hlookup function this is likely to be one of the following:
#N/A Occurs if the Hlookup function fails to find a match to the supplied lookup_value
The cause of this will generally depend on the value of the supplied [range_lookup]:
if [range_lookup] = TRUE
(or is omitted) the #N/A error is likely to be because the smallest value in the lookup
row is greater than the supplied lookup_value.
if [range_lookup] = FALSE
the #N/A error is likely to be because an exact match to the lookup_value is not found in the
lookup row.
If you believe an exact match should have been found by the Hlookup function, see the Failure to
Match Values page for details on how to diagnose and resolve this problem.
Page 10 of 10
Downloaded by shahla ahmadova (ahmadova06@gmail.com)
Download