Professional Documents
Culture Documents
Excel Formulas With Examples
Excel Formulas With Examples
Can Microsoft Excel formulas be easy to learn? Yep! This tutorial explains the very basics of Excel formulas for beginners,
with detailed steps on how to write and use them. It also provides a number of advanced formula examples for
experienced users. You will be amazed how simple creating formulas in Excel actually is.
If asked what Microsoft Excel is about, what would be your answer? Right, it's all about storing and crunching
numbers. You can use Excel to calculate percentages and compound interest, count and sum cells based on
specific criteria, find average, and even get a sample deviation of a given set of values. All this can be done by
using Excel formulas.
In this tutorial, we are going to learn the basics of creating and using formulas in Excel. And because one of the
most efficient ways to learn is through practice, we will also discuss a number of formulas examples to make
things easier to understand. Here's a list of topics we are going to cover:
After the equal symbol, you enter either a calculation or function. For example, to add up values in cells B1
through B5, you can either:
Constants - numbers or text values that you enter directly in a formula, like =2*3.
Cell references - reference to a cell containing the value you want to use in your Excel formula, e.g.
To refer to data in two or more contiguous cells, use a range reference like A1:A5. For example, to sum values
in all cell between A1 and A5, inclusive, use this formula:
=SUM(A1:A5).
Names - defined name for a cell range, constant, table, or function, for example =SUM(my_name).
Functions - predefined formulas in Excel that perform calculations using the values supplied in their arguments.
Operators - special symbols that specify the type of operation or calculation to be performed.
Operators in Excel worksheet formulas
To tell Microsoft Excel what type of operation you want to perform in a formula, you use special symbols that are
technically called operators. There exist 4 types of operators in Excel:
Subtraction =A2-B2
- (minus sign)
Negation (reversing the sign) =-A2 (changes the sign of the value in A2)
=A2*10%
% (percent sign) Percentage
(returns 10% of the value in A2)
=A2^3
^ (caret) Exponential (power of)
(raises the number in A2 to the power of 3)
For example, if you have an item price in cell A2 and VAT in cell B2, you can calculate the VAT amount by using the
following percentage formula: =A2*B2
= Equal to =A2=B2
For example, formula =A1=B1 returns TRUE if cells A1 and B1 contain the same value (number, text or date),
FALSE otherwise.
For more information and examples of using comparison operators in MS Excel formulas, please check out the
following tutorial: Excel logical operators - equal to, not equal to, greater than, less than.
For example, if you have country codes in column A and telephone numbers in column B, you can use the
following formula to get the telephone numbers combined with the country codes:
=A1&" "&B1
In the above formula, we concatenate a space " " in between to make the numbers better readable:
The same result can be achieved by using the CONCATENATE function, and the following tutorial explains all the
details: How to combine text strings, cells and columns in Excel.
Colon (:) - it is a range operator that allows you to make one reference for multiple cells located between 2 cells
that you specify.
For example, range A1:A00 includes 100 cells from A1 through A100. To find an average of those 100 cells, you
use the following formula:
=AVERAGE(A1:A00)
You can also refer to the entire column (A:A) or the entire row (1:1). For example, the following formula finds the
total of all numbers in column A: =SUM(A:A). Find more about whole-column and whole-row references.
Comma (,) - is used to separate arguments in Excel spreadsheet formulas. For example, the formula =IF(A1>0,
"good", "bad") reads as follows: if A1 is greater than zero, return "good", otherwise "bad".
Note. Comma is the default List Separator in North America and some other countries. In European countries,
comma is reserved as the Decimal Symbol and the List Separator is usually set to semicolon (;). In this case, you
need to separate a function's arguments with semicolons, e.g.
So, if you are trying to make a formula in your worksheet, but Excel does not accept it and throws up an
"invalid formula" error, go to your Regional Settings (Control Panel > Region and Language > Additional Settings)
and check what symbol is set as List Separator there. It is that symbol that you need to use to separate
arguments in your Excel formulas.
Space - it is an intersection operator that lets you get the cell(s) common to the two references that you specify.
For example, if you a list of items in column A and some related data in other columns, you can get a value at the
intersection of a given column and row by using a formula like this:
=B3:D3 C2:C4
For a real-life formula example, see how you can do two-way lookup in Excel by using named ranges & space
operator.
Simple Excel formulas perform just one mathematical operation, for example =10*5 or =SUM(A1:A10)
Complex (advanced) Excel formulas include more than one calculation, for example =10*5+20 or
=SUM(A1:A10)/2
Further on in this tutorial, you will find the detailed steps for making both types of Excel spreadsheet formulas.
For example, you can use the following formulas to calculate the total and commission:
And now, let's break down these formulas to see how Microsoft Excel calculates them:
To calculate the 10% commission, you need to multiply the total by 10%, so you enclose the previous calculation
in brackets, and got the result you want.
Of course, nothing prevents you from multiplying the total already calculated in column E by 10%, in this case the
formula would reduce to a simple calculation =E2*10%. However, in large worksheets, it makes sense to write
independently calculated formulas, so that removing a column with one formula wouldn't break the others.
Here is a very simple example of a nested Excel formula that includes the SUM function to find the total, and
ROUND function to round that number to the nearest integer (0 decimal places):
=ROUND(SUM(B2:B6),0)
Of all Excel functions, IF is nested more often than all others. As you probably know, the IF function is used to
evaluate a specified condition and return one value when condition is met, and another value when the condition
is not met. However, quote often you have to deal with situations where there are more than two possible
outcomes. And if this case, you can write several IF functions and nest them into each other:
For the detailed explanation of nested IF's syntax and advanced formula examples, please check out the following
tutorial: Using nested IF functions in Excel.
Since this tutorial is purposed for beginners, I won't intimidate you by the definitions of array constants and
complex multi-line formulas. I'll show just one very simple example of an Excel array formula that demonstrates
what they are capable for.
Supposing you have 2 columns of numbers, column A and B. And you want to know how many times column B is
greater than or equal to column A when a value in column B is greater than 0.
This task requires comparing two ranges and you can do this by using the following array formula:
=SUM((B2:B10>=A2:A10) * (B2:B10>0))
Note. To enter an Excel array formula correctly, you have to press Ctrl+Shift+Enter instead of conventional
Enter stroke.
To learn more about Excel array formulas, please see the following tutorials:
Excel array formulas, functions and constants - explains the basics of array formulas and shows how to use
array constants and array functions.
Excel array formula examples for beginners and power users - 7 fascinating examples of advanced array
formulas in Excel.
Such custom functions are called User Defined Functions (UDFs), and they are especially useful for advanced
mathematic or engineering calculations. Like macros, user defined functions are written in VBA (Visual Basic for
Applications). As an example, you can review and download custom functions created by our team to count and
sum cells by color.
Absolute cell reference ($A$1) - the $ sign before the row and column coordinates makes a reference static, and
lets you copy a formula without changing references.
Relative cell reference (A1) - a cell reference with no $ sign changes based on relative position of rows and
columns in a spreadsheet.
Absolute column and relative row ($A1) - the $ sign in front of the column letter locks the reference to the
specified column, so the column never changes. The relative row reference, without the dollar sign, changes
depending on the row to which the formula is copied.
Relative column and absolute row (A$1) - the row's reference locked by $ doesn't change, and the column's
reference does.
The following image shows how different reference types work in practice.
For more information about Excel cell reference and more formula examples, please see Why use $ in Excel
formulas.
To toggle between absolute, relative and mixed references in a formula, use the F4 key as demonstrated in
Switching between reference types in Excel.
To view all formulas on the sheet, click the Show formulas button on the Formulas tab > Formula Auditing
group or press the Ctrl+~ shortcut.
To edit a formula, press F2 , or double click a cell, or click the formula bar.
To debug formulas in Excel, select a formula part and press F9 . This will let you see the actual values behind
cell references.
To copy a formula to all cells in a column, enter the formula in the first cell, select that cell, and hover the
cursor over the small square in bottom right corner until it changes to a black cross (which is called
the fill handle). Double click that cross, and you will get the formula copied through the entire column.
To convert formulas to values, select all cells with formulas that you want to convert, press Ctrl+C to copy
those formulas, then press Shift+F10 , then press V , and then hit Enter. Shift + F10 + V is the shortcut for
Excel's Paste special - values only. If you are not sure you will remember this shortcut, then simply press a usual
shortcut for paste Ctrl+V , click the small arrow to the right of the Paste button to open the drop-down list, and
select Paste Values. For more information, see How to replace formulas with their values in Excel.
Compound interest formula in Excel - shows how to calculate daily, monthly, and yearly compounding.
SUMIFS formulas in Excel - sum formula to add up cells based on more than one criteria.
Excel SUM in array formulas - how to use the SUM function in array formulas to add up values with multiple
AND criteria.
COUNTIF formula in Excel - formula examples to conditionally count cells based on exact and partial match,
count duplicates and unique values, and more.
Calculating moving average in Excel - formula examples to calculate a simple moving average in Excel for the
last N days, weeks, months or years.
Weighted average formula in Excel - two easy ways to calculate weighted average in Excel, by using the SUM
and SUMPRODUCT functions.
How to convert Excel date to text - formula to cover a date to a text string in a specified format.
Excel DATE formula examples - how to get a serial number representing a date, add and subtract dates in Excel,
return a date based on values in other cells, convert a text string to a date, plus a few advanced Excel DATE
formula examples.
Day of week function (WEEKDAY) - formulas to return the day of the week from a given date, identify, filter,
count and highlight workdays and weekends, and more.
How to calculate months in Excel (MONTH and EOMONTH functions) - examples of Excel date formula to
extract month from date, get the first and last day of the month, convert month name to number and more.
Calculating week number in Excel (WEEKNUM function) - how to use date formulas in Excel to get week number
from date, convert week number to date, get a week number in a month, sum values by week number, and
more.
How to add and subtract dates in Excel - date formulas to add and subtract days, weeks, months and years.
How to calculate difference between two dates (DATEDIF function) - Excel date formula to calculate difference
between two dates in days, weeks, months or years.
Calculating weekdays in Excel (WORKDAY and NETWORKDAYS) - using date formula in Excel to calculate
workdays with custom weekend parameters and holidays.
Convert date to year & calculate age from date of birth - Excel age formulas, and a few other date formulas to
extract year from date, convert date to month and year, determine leap years.
Convert time to decimal number, hours, minutes or seconds - variety of formulas to change time to decimal
number, hours, minutes or seconds, convert text to time and vice versa.
How to calculate time in Excel - a few formulas to add and subtract times, calculate time difference, elapsed
time, and more.
How to use VLOOKUP & SUM or SUMIF functions in Excel - advanced Excel formulas to look up and sum values
based on one or several criteria.
Advanced Excel VLOOKUP formulas - examples of two-way lookup, nested vlookup with multiple criteria, and
more.
Formulas to conditionally format dates and time in Excel - how to differentiate between weekdays and
weekends, highlight public holidays, display a coming deadline or delay, and more.
Well, we seem to have finally got to the end. What was planned as a short Excel formula tutorial for beginners has
nearly turned into a voluminous manual because there are so many different aspects of Excel formulas to cover. I
am really thankful to everyone who has read this page to the end!
184 comments
← Older Comments
1 jake says:
2023-06-05 at 8:33 am
hi I'm trying to create a formula to create a calculator to work out when a specific size is typed in, it
multiples the amount specified to that size inputted however the sizes are ranges e.g. 11-20 is £16
so if the product is 18 that mean18x£16 or 21 will times that by another figure I have 10 different
price ranges and 10 different sizes ranges from 1-2, 3-5, 6-10, 11-20, 21-50, 51-100, 101-500, 500+,
4-10no. and 11-20no.
Thanks
Reply
Hi! Use the IFS logical function for multiple conditions. You can find the examples and detailed
instructions here: The new Excel IFS function instead of multiple IF. For example,
=IFS(A1>500,B1*100,A1>101,B1*50,A1>51,B1*20,......)
Reply
Post a comment
Click here to cancel reply.
Your comment
I have read and accept the Terms of use and Privacy Policy
Send
2 Jovin says:
2023-04-28 at 5:21 pm
When am using Excel in business how can I set for the weekly sales to be in one sheet by making
sure the tock will continue change according to the daily sales
Reply
Please ask a specific question on the Excel formula, provide the source data and the desired
result.
Reply
3 Jay says:
2023-01-13 at 3:33 pm
Hi, I just want to ask how can I download this. Do you have any PDF copy?
Reply
4 Vishranti says:
2022-12-18 at 11:27 am
Hello,
My question is in my marksheet, i can't get percentage when I started calculate percentage there
where show 4500% how is this possible please help me
Reply
Hi!
I recommend reading this guide: How to calculate percentage in Excel - formula examples.
Reply
5 Erinahflit says:
2022-11-06 at 8:37 am
Reply
Just have to let you know that this is the most concise teaching on excel formulas I have found on
the internet. Great job breaking it down systematically, easy to understand, comprehensive and
concise.
Reply
7 GK says:
2022-10-12 at 9:20 am
I fetched a few values using LOOKUP function and I'm getting #N/A in some of the cells. I've
checked the references and the format also the value does exist. I can't see a reason why N/A is
showing up even after having all conditions met. Pls help. Others in my team had the same data
and they got it using the same formula. Is there a problem in my excel or ...?
Reply
Alexander Trifuntov (Ablebits Team) says:
2022-10-12 at 10:51 am
Hello!
See this article for all the possible causes of your problem and their solution: Excel VLOOKUP
not working - solving #N/A and #VALUE errors. This should solve your task.
Reply
VLOOKUP should never be used in modern versions of Excel. Use XLOOKUP instead, or INDEX-
MATCH for backwards compatability. VLOOKUP falsely marks many cells as precedents, breaks
if a column is inserted or removed between the lookup column and return column, and can't
return a value from a column to the left of the lookup column.
Reply
I am looking to find the difference between two cells in Column E, with the condition that: the
calculation only takes the difference between an odd and even number cell (Ex: E2-E3), AND, the
formula does not subtract from the previous result (Ex: E2-E3 generates one result, E4-E5
generates another result, and so on).
Reply
Hi!
Your task is not completely clear to me. Please provide me with an example of the source data
and the expected result.
Reply
I am trying to write a formula for correctly guessing 5 football team positions after a nominated
period. My sheet has the 5 positions 1 to 5 in rows 82 to 86, the correct positions are in column U,
the guesses are in column W and the points scored are in column X. The formula in column X
would return 3 if the guess was correct, 1 if in any of the other 4 positions or 0 if not in any of the
5 positions. I realise all 5 rows would have a slightly different formula. Can you help please?
Reply
Alexander Trifuntov (Ablebits Team) says:
2022-08-29 at 8:18 am
Hello!
To match a value in a column, use the MATCH function. Use the nested IF function to select a
match option.
=IF(U82=W82,3, IF(ISNUMBER(MATCH(W82,$U$82:$U$86,0)),1,0))
Reply
10 Tess says:
2022-08-25 at 12:01 pm
I'm trying to write a formula that will solve this equation for "b" but I don't know how to do it. I've
tried several different ways but nothing will give me the correct answer. Please help!
35 = -65.2*0.75+b
Reply
Hi!
You just need to remember the mathematics from school.
=35+65.2*0.75
Reply
11 Emrema says:
2022-08-14 at 1:19 pm
Reply
12 Ali says:
2022-08-08 at 5:39 am
Hi, cell A1 has a number like 725000, I need a result in cell B1:
725,000 minus 600,000 = 125,000 *10% =12500 & plus 10,000 = 22500 result should be 22,500 in
cell B1
Reply
Reply
14 haidar says:
2022-04-30 at 6:57 am
Reply
Hi!
Perhaps the VLOOKUP function will be useful to solve your problem and find the necessary
values. If this does not suit you, explain the problem in more detail.
Reply
15 Krissy says:
2022-03-17 at 8:37 pm
How would I calculate this equation in terms of x and y; when X=1(C5) and Y=3(C6)
4 + y/(2x+y)sqrt 2 + 12
(The 2x+y is in parenthesis but then squared but didn’t know how to type that here.
I just need a formula to get the correct answer. I’ve tried several different ways and I keep getting
the incorrect answer.
Reply
Hello!
You did not write what result you wanted to get. But I think this formula will work for you -
=4+C6/(2*C5+C6)^2+12
Reply
16 hanggg says:
2022-03-11 at 2:35 pm
Reply
Alexander Trifuntov (Ablebits Team) says:
2022-03-14 at 7:11 am
Hello!
A number in Excel cannot contain more than 15 digits. Use the rounding functions for
numbers.
If your number is written as text, take a look at this article: Convert text to number with formula
and other ways.
I hope I answered your question.
Reply
17 Ebhe says:
2022-02-28 at 8:30 pm
I don't really know, but near the top of the page there are two spots that talk about "rages" is that
a typo?
Reply
Reply
18 n.k.dashora says:
2022-02-09 at 6:45 am
What is Excel formula for Beta Distribution. Can I solve Beta distribution by using scientific
calculator or Excel workbook just by using +,- * / and ^ and Factorial.
Or I will have to learn programming language ?
I know that Beta distribution can be calculated by using Excel , but I want to solve just by using
Plus, Minus, multiplication, Division, Power ,log and Factorial.
Thanks
Reply
Reply
20 Redzwan says:
2021-10-09 at 7:27 am
Nice piece of work. Thank you.
Reply
I want to your suggestions and support...really appreciate the help..and I want to learn mis excel
Reply
I will have multiple rows of information, and need to be able to create a sort.
Thanks - Dewey
Reply
Reply
Reply
Reply
Can someone help me with this? I need to know what formula should i use... Please...
Reply
Hello!
Please check out the following article on our blog, it’ll be sure to help you with your task: Excel
Nested IF statements
Reply
27 Amarender says:
2021-02-25 at 12:13 pm
Reply
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please
describe your task in more detail. Please specify what you were trying to find. Give an example
of the source data and the expected result.
It’ll help me understand it better and find a solution for you.
Reply
28 M says:
2020-12-22 at 10:26 am
Reply
29 sam says:
2020-12-11 at 8:01 pm
Hi Sam,
In Excel, an asterisk (*) is a wildcard that represents any sequence of characters. In your case,
"*:*" will match any cell that contains a colon (:) in any position.
Reply
Reply
like this
Colum C1 682728,659223,449369
Colum C2 329452,856318,516020
Colum C3 785713,3600088
Colum C4 711182,25525
Reply
Hello!
If I understand your task correctly, split a cell into columns using any of the methods described
in this tutorial. Then use the MATCH function to determine the position number of your
number.
I hope my advice will help you solve your task.
Reply
if in Colum A1 4545,4815,8899,2288,123
an in Colum C4 4815
how we can apply a formula in the next Colum D4 ............ to find the value 4815 for Colum A1
Reply
Hello!
Could you please describe it in more detail? What result do you want to get?
To find out that C4 is found in A1, we need the formula
=ISNUMBER(FIND(C4,A1,1))
Reply
if multiple Colum are given how we can apply a formula with multiple rang formula
Reply
33 BK Dubey says:
2020-09-16 at 11:55 am
Basic DA Total PF
11500 5495 16995 12% (PF always be cut on 15000, not on total)
than what is the formula
Reply
← Older Comments