Académique Documents
Professionnel Documents
Culture Documents
The most used functions in Excel are the functions that count and sum. You can count and sum based on
onecriteria or multiple criteria.
Count
To count the number of cells that contain numbers, use the COUNT function.
Advertisement
Countif
To count cells based on one criteria (for example, higher than 9), use the following COUNTIF function.
Countifs
To count cells based on multiple criteria (for example, green and higher than 9), use the following COUNTIFS
function.
Sum
To sum a range of cells, use the SUM function.
Sumif
To sum cells based on one criteria (for example, higher than 9), use the following SUMIF function (two arguments).
To sum cells based on one criteria (for example, green), use the following SUMIF function (three arguments, last
argument is the range to sum).
Sumifs
To sum cells based on multiple criteria (for example, blue and green), use the following SUMIFS function (first
argument is the range to sum).
General note: in a similar way, you can use the AVERAGEIF and AVERAGEIFS function to average cells based on
one or multiple criteria.
Logical Functions
If Function | And Function | Or Function
Learn how to use Excel's logical functions such as the IF, AND and OR function.
If Function
The IF function checks whether a condition is met, and returns one value if TRUE and another value if FALSE.
Advertisement
The IF function returns Correct because the value in cell A1 is higher than 10.
And Function
The AND Function returns TRUE if all conditions are true and returns FALSE if any of the conditions are false.
The AND function returns FALSE because the value in cell B2 is not higher than 5. As a result the IF function returns
Incorrect.
Or Function
The OR function returns TRUE if any of the conditions are TRUE and returns FALSE if all conditions are false.
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. Learn more about Date and Time formats.
Advertisement
Note: use the MONTH and DAY function to get the month and day of a date.
Date Function
1. To add a number of days to a date, use the following simple formula.
2. 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).
Note: use the TODAY function to get the current date only. Use NOW()-TODAY() to get the current time only (and
apply a Time format).
Note: use the MINUTE and 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
Join Strings | Left | Right | Mid | Len | Find | Substitute
Excel has many functions to offer when it comes to manipulating text strings.
Join Strings
To join strings, use the & operator.
Advertisement
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.
Find
To find the position of a substring in a string, use the FIND function.
Substitute
To replace existing text with new text in a string, use the SUBSTITUTE function.
Lookup & Reference Functions
VLookup | HLookup | Match | Index | Choose
Learn all about Excel's lookup & reference functions such as the VLOOKUP, HLOOKUP, MATCH, INDEX and
CHOOSE function.
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.
Advertisement
Explanation: 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.
HLookup
In a similar way, you can use the HLOOKUP (Horizontal lookup) function.
Match
The MATCH function returns the position of a value in a given range.
Note: 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.
Index
The INDEX function returns a specific value in a two-dimensional or one-dimensional range.
Note: 92 found at the intersection of row 3 and column 2 in the range E4:F7.
Note: 97 found at position 3 in the range E4:E7.
Choose
The CHOOSE function returns a value from a list of values, based on a position number.
This chapter gives an overview of some very useful statistical functions in Excel.
Average
To calculate the average of a range of cells, use the AVERAGE function.
Advertisement
Averageif
To average cells based on one criteria, use the AVERAGEIF function. For example, to calculate the average
excluding zeros.
Note: <> means not equal to. The AVERAGEIF function is similar to the SUMIF function.
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.
Standard Deviation
To calculate the standard deviation, use the STEDV function.
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:
Tip: Excel can generate most of these results with the click of a button. Our Descriptive Statistics example shows you
how.
Nested If
The IF function can be nested, when you have multiple conditions to meet. The FALSE value is being replaced by
another If function to make a further test. For example, look at the formula below.
Advertisement
1d. If cell A1 equals another value, the function returns No Valid Score.
2b. If cell A1 is greater than 10 and less or equal to 20, the function returns 700.
2c. If cell A1 is greater than 20 and less or equal to 30, the function returns 1400.
Note: to slightly change the boundaries, you might want to use "<" instead of "<=" in your own formula.
Advertisement
What-If Analysis
Create Different Scenarios | Scenario Summary | Goal Seek
What-If Analysis in Excel allows you to try out different values (scenarios) for formulas. The following example helps
you master what-if analysis quickly and easily.
Assume you own a book store and have 100 books in storage. You sell a certain % for the highest price of $50 and a
certain % for the lower price of $20.
Advertisement
If you sell 60% for the highest price, cell D10 calculates a total profit of 60 * $50 + 40 * $20 = $3800.
Note: You can simply type in a different percentage into cell C4 to see the corresponding result of a scenario in cell
D10. However, what-if analysis enables you to easily compare the results of different scenarios. Read on.
1. On the Data tab, click What-If Analysis and select Scenario Manager from the list.
The Scenario Manager dialog box appears.
3. Type a name (60% highest), select cell C4 (% sold for the highest price) for the Changing cells and click on OK.
4. Enter the corresponding value 0.6 and click on OK again.
Finally, your Scenario Manager should be consistent with the picture below:
Note: to see the result of a scenario, select the scenario and click on the Show button. Excel will change the value of
cell C4 accordingly for you to see the corresponding result on the sheet.
Advertisement
Scenario Summary
To easily compare the results of these scenarios, execute the following steps.
2. Next, select cell D10 (total profit) for the result cell and click on OK.
Result:
Conclusion: if you sell 70% for the highest price, you obtain a total profit of $4100, if you sell 80% for the highest
price, you obtain a total profit of $4400, etc. That's how easy what-if analysis in Excel can be.
Goal Seek
What if you want to know how many books you need to sell for the highest price, to obtain a total profit of exactly
$4700? You can use Excel's Goal Seek feature to find the answer.
4. Click in the 'By changing cell' box and select cell C4.
5. Click OK.
Result. You need to sell 90% of the books for the highest price to obtain a total profit of exactly $4700.
Advertisement
FREQUENTLY ASKED QUESTIONS
Question: In Microsoft Excel, I need to write a formula that works this way:
If (cell A1) is less than 20, then multiply by 1,
If it is greater than or equal to 20 but less than 50, then multiply by 2
If its is greater than or equal to 50 and less than 100, then multiply by 3
And if it is great or equal to than 100, then multiply by 4
Answer: You can write a nested IF statement to handle this. For example:
Answer:In cell C5, you can write a nested IF statement that uses the AND function as
follows:
=IF((A1+B1)<=4,20,IF(AND((A1+B1)>4,(A1+B1)<=9),35,IF(AND((A1+B1)>9,(A1+B1)<=14),50,75
)))