You are on page 1of 5

Function 

arguments
Most functions require inputs to return a result. These inputs are called "arguments". A function's arguments appear after the
function name, inside parentheses, separated by commas.  All functions require a matching opening and closing parentheses ().
The pattern looks like this:
=FUNCTIONNAME(argument1,argument2,argument3)
For example, the COUNTIF function counts cells that meet criteria, and takes two arguments, range and criteria:
=COUNTIF(range,criteria) // two arguments
In the screen below, range is A1:A5 and criteria is "red". The formula in C1 is:
=COUNTIF(A1:A5,"red") // returns 2

 
Video: How to use the COUNTIF function
Not all arguments are required. Arguments shown square brackets are optional. For example, the YEARFRAC function returns
fractional number of years between a start date and end date and takes 3 arguments:
=YEARFRAC(start_date,end_date,[basis])
Start date and end date are required arguments, basis is an optional argument. See below for an example of how to use
YEARFRAC to calculate current age based on birthdate.
How to enter a function
If you know the name of the function, just start typing. Here are the steps:
1. Enter equals sign (=) and start typing. Excel will list of matching functions based as you type:

When you see the function you want in the list, use the arrow keys to select (or just keep typing).
2. Type the Tab key to accept a function. Excel will complete the function:

3. Fill in required arguments:


4. Press Enter to confirm formula:

Combining functions (nesting)


Many Excel formulas use more than one function, and functions can be "nested" inside each other. For example, below we have
a birthdate in B1 and we want to calculate current age in B2:

The YEARFRAC function will calculate years with a start date and end date:

We can use B1 for start date, then use the TODAY function to supply the end date:
When we press Enter to confirm, we get current age based on today's date:
=YEARFRAC(B1,TODAY())

Notice we are using the TODAY function to feed an end date to the YEARFRAC function. In other words, the TODAY function
can be nested inside the YEARFRAC function to provide the end date argument. We can take the formula one step further and
use the INT function to chop off the decimal value:
=INT(YEARFRAC(B1,TODAY()))

Here, the original YEARFRAC formula returns 20.4 to the INT function, and the INT function returns a final result of 20.
Notes:
The current date in images above is February 22, 2019.
Nested IF functions are a classic example of nesting functions. 
The TODAY function is a rare Excel function with no required arguments.
Key takeaway: The output of any formula or function can be fed directly into another formula or function. 
Math Operators
The table below shows the standard math operators available in Excel:
Symbol Operation Example

+ Addition =2+3=5

- Subtraction =9-2=7

* Multiplication =6*7=42

/ Division =9/3=3

^ Exponentiation =4^2=16

() Parentheses =(2+4)/3=2
Logical operators
Logical operators provide support for comparisons such as "greater than", "less than", etc. The logical operators available in
Excel are shown in the table below:
Operator Meaning Example

= Equal to =A1=10

<> Not equal to =A1<>10

> Greater than =A1>100


Operator Meaning Example
< Less than =A1<100

>= Greater than or equal to =A1>=75

<= Less than or equal to =A1<0


Common functions
Let's look at some of the most commonly used functions in Excel. We will start with statistical functions.
S/ FUNCTION CATEGORY DESCRIPTION USAGE
N

01 SUM Math & Trig Adds all the values in a range of cells =SUM(E4:E8)

02 MIN Statistical Finds the minimum value in a range of cells =MIN(E4:E8)

03 MAX Statistical Finds the maximum value in a range of cells =MAX(E4:E8)

04 AVERAGE Statistical Calculates the average value in a range of cells =AVERAGE(E4:E8)

05 COUNT Statistical Counts the number of cells in a range of cells =COUNT(E4:E8)

06 LEN Text Returns the number of characters in a string text =LEN(B7)

07 SUMIF Math & Trig Adds all the values in a range of cells that meet a specified =SUMIF(D4:D8,">=1000",C4:C8)
criteria. =SUMIF(range,criteria,[sum_range])

08 AVERAGEI Statistical Calculates the average value in a range of cells that meet the =AVERAGEIF(F4:F8,"Yes",E4:E8)
F specified criteria. =AVERAGEIF(range,criteria,[average_range])

09 DAYS Date & Time Returns the number of days between two dates =DAYS(D4,C4)

10 NOW Date & Time Returns the current system date and time =NOW()
Numeric Functions
As the name suggests, these functions operate on numeric data. The following table shows some of the common numeric
functions.
S/ FUNCTION CATEGORY DESCRIPTION USAGE
N

1 ISNUMBER Information Returns True if the supplied value is numeric and False if it is not numeric =ISNUMBER(A3)

2 RAND Math & Trig Generates a random number between 0 and 1 =RAND()

3 ROUND Math & Trig Rounds off a decimal value to the specified number of decimal points =ROUND(3.14455,2)

4 MEDIAN Statistical Returns the number in the middle of the set of given numbers =MEDIAN(3,4,5,2,5)

5 PI Math & Trig Returns the value of Math Function PI(π) =PI()

6 POWER Math & Trig Returns the result of a number raised to a power. POWER( number, power ) =POWER(2,4)

7 MOD Math & Trig Returns the Remainder when you divide two numbers =MOD(10,3)
8 ROMAN Math & Trig Converts a number to roman numerals =ROMAN(1984)
String functions
These functions are used to manipulate text data. The following table shows some of the common string functions.
S/N FUNCTION CATEGORY DESCRIPTION USAGE COMMENT

1 LEFT Text Returns a number of specified characters from the =LEFT("GURU99",4) Left 4
start (left-hand side) of a string Characters of
"GURU99"

2 RIGHT Text Returns a number of specified characters from the =RIGHT("GURU99",2) Right 2
end (right-hand side) of a string Characters of
"GURU99"

3 MID Text Retrieves a number of characters from the middle of =MID("GURU99",2,3) Retrieving
a string from a specified start position and Characters 2 to
length. =MID (text, start_num, num_chars) 5

4 ISTEXT Information Returns True if the supplied parameter is Text =ISTEXT(value) value - The
value to check.

5 FIND Text Returns the starting position of a text string within =FIND("oo","Roofing",1) Find oo in
another text string. This function is case- "Roofing",
sensitive. =FIND(find_text, within_text, [start_num]) Result is 2

6 REPLACE Text Replaces part of a string with another specified =REPLACE("Roofing",2,2,"xx") Replace "oo"
string. =REPLACE (old_text, start_num, num_chars, with "xx"
new_text)
Date Time Functions
These functions are used to manipulate date values. The following table shows some of the common date functions
S/N FUNCTION CATEGORY DESCRIPTION USAGE

1 DATE Date & Time Returns the number that represents the date in excel code =DATE(2015,2,4)

2 DAYS Date & Time Find the number of days between two dates =DAYS(D6,C6)

3 MONTH Date & Time Returns the month from a date value =MONTH("4/2/2015")

4 MINUTE Date & Time Returns the minutes from a time value =MINUTE("12:31")

5 YEAR Date & Time Returns the year from a date value =YEAR("04/02/2015")

You might also like