Basic Excel Formuals and Functions
Basic Excel Formuals and Functions
The tutorial provides a list of Excel basic formulas and functions with examples and links to related in-depth tutorials. Excel: featured articles
Merge multiple sheets into one
Being primarily designed as a spreadsheet program, Microsoft Excel is extremely powerful and versatile when it comes to calculating numbers or
solving math and engineering problems. It enables you to total or average a column of numbers in the blink of an eye. Apart from that, you can Combine Excel files into one
compute a compound interest and weighted average, get the optimal budget for your advertising campaign, minimize the shipment costs or make
Compare two files / worksheets
the optimal work schedule for your employees. All this is done by entering formulas in cells.
Merge Excel tables by matching
This tutorial aims to teach you the essentials of Excel functions and show how to use basic formulas in Excel. column data or headers
10 basic Excel functions you should definitely know Create calendar in Excel
(drop-down and printable)
Best practices for writing Excel formulas
3 ways to remove spaces between
words
There exist 400+ functions in Excel, and the number is growing by version to version. Of course, it's next to impossible to memorize all of them, and
you actually don't need to. The Function Wizard will help you find the function best suited for a particular task, while the Excel Formula Intellisense
will prompt the function's syntax and arguments as soon as you type the function's name preceded by an equal sign in a cell:
Clicking the function's name will turn it into a blue hyperlink, which will open the Help topic for that function.
Tip. You don't necessarily have to type a function name in all caps, Microsoft Excel will automatically capitalize it once you finish typing the formula
and press the Enter key to complete it.
SUM
The first Excel function you should be familiar with is the one that performs the basic arithmetic operation of addition:
SUM(number1, [number2], …)
In the syntax of all Excel functions, an argument enclosed in [square brackets] is optional, other arguments are required. Meaning, your Sum formula
should include at least 1 number, reference to a cell or a range of cells. For example:
If necessary, you can perform other calculations within a single formula, for example, add up values in cells B2 through B6, and then divide the sum
by 5:
=SUM(B2:B6)/5
To sum with conditions, use the SUMIF function: in the 1st argument, you enter the range of cells to be tested against the criteria (A2:A6), in the 2nd
argument - the criteria itself (D2), and in the last argument - the cells to sum (B2:B6):
In your Excel worksheets, the formulas may look something similar to this:
Tip. The fastest way to sum a column or row of numbers is to select a cell next to the numbers you want to sum (the cell immediately below the
last value in the column or to the right of the last number in the row), and click the AutoSum button on the Home tab, in the Formats group. Excel
will insert a SUM formula for you automatically.
Useful resources:
Excel Sum formula examples - formulas to total a column, rows, only filtered (visible) cells, or sum across sheets.
AVERAGE
The Excel AVERAGE function does exactly what its name suggests, i.e. finds an average, or arithmetic mean, of numbers. Its syntax is similar to SUM's:
AVERAGE(number1, [number2], …)
Having a closer look at the formula from the previous section (=SUM(B2:B6)/5), what does it actually do? Sums values in cells B2 through B6, and
then divides the result by 5. And what do you call adding up a group of numbers and then dividing the sum by the count of those numbers? Yep, an
average!
The Excel AVERAGE function performs these calculations behind the scenes. So, instead of dividing sum by count, you can simply put this formula in a
cell:
=AVERAGE(B2:B6)
To average cells based on condition, use the following AVERAGEIF formula, where A2:A6 is the criteria range, D3 is he criteria, and B2:B6 are the cells
to average:
Useful resources:
Excel AVERAGE - average cells with numbers.
Excel AVERAGEA - find an average of cells with any data (numbers, Boolean and text values).
=MAX(B2:B6)
=MIN(B2:B6)
Useful resources:
MAX function - find the highest value.
MINIFS function - find the smallest number based on one or several conditions.
COUNT(value1, [value2], …)
While the COUNT function deals only with those cells that contain numbers, the COUNTA function counts all cells that are not blank, whether they
contain numbers, dates, times, text, logical values of TRUE and FALSE, errors or empty text strings (""):
For example, to find out how many cells in column B contain numbers, use this formula:
=COUNT(B:B)
=COUNTA(B:B)
In both formulas, you use the so-called "whole column reference" (B:B) that refers to all the cells within column B.
The following screenshot shows the difference: while COUNT processes only numbers, COUNTA outputs the total number of non-blank cells in
column B, including the the text value in the column header.
Useful resources:
Excel COUNT function - a quick way to count cells with numbers.
Excel COUNTA function - count cells with any values (non-empty cells).
IF
Judging by the number of IF-related comments on our blog, it's the most popular function in Excel. In simple terms, you use an IF formula to ask Excel
to test a certain condition and return one value or perform one calculation if the condition is met, and another value or calculation if the condition is
not met:
For example, the following IF statement checks if the order is completed (i.e. there is a value in column C) or not. To test if a cell is not blank, you use
the "not equal to" operator ( <>) in combination with an empty string (""). As the result, if cell C2 is not empty, the formula returns "Yes", otherwise
"No":
Useful resources:
IF function in Excel with formula examples
TRIM
If your obviously correct Excel formulas return just a bunch of errors, one of the first things to check is extra spaces in the referenced cells (You may
be surprised to know how many leading, trailing and in-between spaces lurk unnoticed in your sheets just until something goes wrong!).
There are several ways to remove unwanted spaces in Excel, with the TRIM function being the easiest one:
TRIM(text)
For example, to trim extra spaces in column A, enter the following formula in cell A1, and then copy it down the column:
=TRIM(A1)
It will eliminate all extra spaces in cells but a single space character between words:
Useful resources:
Excel TRIM function with formula examples
LEN
Whenever you want to know the number of characters in a certain cell, LEN is the function to use:
LEN(text)
Wish to find out how many characters are in cell A2? Just type the below formula into another cell:
=LEN(A2)
Please keep in mind that the Excel LEN function counts absolutely all characters including spaces:
Want to get the total count of characters in a range or cells or count only specific characters? Please check out the following resources.
Useful resources:
Excel LEN formulas to count characters in a cell
AND & OR
These are the two most popular logical functions to check multiple criteria. The difference is how they do this:
While rarely used on their own, these functions come in very handy as part of bigger formulas.
For example, to check the test results in columns B and C and return "Pass" if both are greater than 60, "Fail" otherwise, use the following IF formula
with an embedded AND statement:
If it's sufficient to have just one test score greater than 60 (either test 1 or test 2), embed the OR statement:
CONCATENATE
In case you want to take values from two or more cells and combine them into one cell, use the concatenate operator (&) or the CONCATENATE
function:
CONCATENATE(text1, [text2], …)
For example, to combine the values from cells A2 and B2, just enter the following formula in a different cell:
=CONCATENATE(A2, B2)
To separate the combined values with a space, type the space character (" ") in the arguments list:
Useful resources:
How to concatenate in Excel - formula examples to combine text strings, cells and columns.
CONCAT function - newer and improved function to combine the contents of multiple cells into one cell.
The beauty of these functions is that they don't require any arguments at all, you type the formulas exactly as written above.
Useful resources:
Excel NOW function - how to insert the current date and time as a dynamic value.
How to insert today's date in Excel - different ways to enter the current date in Excel: as an unchangeable time stamp or automatically updatable
date and time.
Excel date functions with formula examples - formulas to convert date to text and vice versa, extract a day, month or year from a date, calculate the
difference between two dates, and a lot more.
For example, to check the value in cell B2 and return 1 for "Passed", 0 otherwise, you put the following formula, say, in C2:
=IF(B2="pass", 1, 0)
Copy the formula down to other cells and you will have a column of 1's and 0's that can be calculated without a hitch.
At first sight, the output is normal - the same column of 1's and 0's. Upon a closer look, however, you will notice that the resulting values are left-
aligned in cells by default, meaning those are numeric strings, not numbers! If later on someone will try to calculate those 1's and 0's, they might end
up pulling their hair out trying to figure out why a 100% correct Sum or Count formula returns nothing but zero.
Note. After copying the formula, make sure that all cell references are correct. Cell references may change depending on whether they are
absolute (do not change) or relative (change).
For the detailed step-by-step instructions, please see How to copy formulas in Excel.
Right-click the selection, and then click Paste Values > Values to paste the calculated values back to the selected cells. Or, press the Paste Special
shortcut: Shift+F10 and then V .
For the detailed steps with screenshots, please see How to replace formulas with their values in Excel.
If this does not help, check out these troubleshooting steps: Excel formulas not working: fixes & solutions.
This is how you make and manage basic formulas in Excel. I how you will find this information helpful. Anyway, I thank you for reading and hope to
see you on our blog next week.
409 comments
← Older Comments
thanks
Reply
Reply
Reply
For me personally It's clear that actually "seeing" something written down is easier to understand and remember than "hearing" it, but both together is even better.
Reply
← Older Comments
Post a comment
Your comment
I have read and accept the Terms of use and Privacy Policy
Send
Privacy policy Cookies policy Cookie settings Terms of use Legal Contact us
Copyright © 2003 – 2024 Office Data Apps sp. z o.o.