Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
This article describes the formula syntax and usage of the ABS function in Microsoft Excel.
Description
Returns the absolute value of a number. The absolute value of a number is the number without its sign.
Syntax
ABS(number)
The ABS function syntax has the following arguments:
-
Number Required. The real number of which you want the absolute value.
Example
Copy the table below, and paste into cell A1 in Excel. You may need to select any cells that contain formulas and press F2 and then Enter to make the formulas work. You may also want to make the columns wider to make your worksheet easier to read.
Data |
||
-4 |
||
Formula |
Description |
Result |
=ABS(2) |
Absolute value of 2 |
2 |
=ABS(-2) |
Absolute value of -2 |
2 |
=ABS(A2) |
Absolute value of -4 |
4 |
See Also
Subtract numbers
Multiply and divide numbers in Excel
Calculate percentages
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Returns the absolute value of a number
What is the ABSOLUTE Function in Excel (ABS)?
The ABS Function[1] in Excel returns the absolute value of a number. The function converts negative numbers to positive numbers while positive numbers remain unaffected.
Formula
ABSOLUTE Value = ABS(number)
Where number is the numeric value for which we need to calculate the Absolute value.
How to use the ABSOLUTE Function in Excel?
Let’s take a series of numbers to understand how this function can be used.
In the screenshot above, we are given a series of numbers. When we use the ABSOLUTE function, we get the following results:
- For positive numbers, we get the same result. So 45 is returned as 45.
- For negative numbers, the function returns absolute numbers. So for -890, -67, -74, we got 890, 67, 74.
To learn more, launch our free Excel crash course now!
Examples of the ABSOLUTE Function in Excel
For our analysis, we want the difference between Series A and Series B as given below. Ideally, if you subtract Series A from Series B you might get negative numbers depending on the values. However, if you want absolute numbers in this scenario, we can use the ABSOLUTE function.
The results returned using ABSOLUTE function would be absolute numbers. So ABS can be combined with other functions such as SUM, MAX, MIN, AVERAGE, etc. to calculate the absolute value for positive and negative numbers in Excel spreadsheets.
Let’s see a few examples of how ABS can be used with other Excel Functions.
1. SUMIF and ABS
We all are aware that SUMIF would sum up values if certain criteria within the range given are met. Let’s assume we’ve been given a few numbers in Column A and Column B as below:
Now, I wish to subtract all negative numbers in Column B from all positive numbers of Column A. I want the result to be an absolute number. So I can use the ABS function along with SUMIF in the following manner:
The result is 79. Excel added 15 and 6 from Column A and subtracted 100 from Column B to give us 79, as we used ABS function instead of -79.
2. SUM ARRAY Formula and ABS Function
The Excel array formulas help us to do multiple calculations for a given array or column of values. We can use SUM ARRAY along with ABS to get the absolute value of a series of numbers in column or row. Suppose we are given a few numbers as below, so in this scenario, the SUM array formula for absolute values would be =SUM(ABS(A2:A6)).
Now, select cell A7 in your spreadsheet, and enter the formula ‘=SUM(ABS(A2:A6))’. After entering the formula in cell A7, press “Ctrl + Shift + Enter”. Once we do this, the formula will have {} brackets around it as shown in the screenshot below.
As seen in the screenshot above, the array formula also returned the value 44 in cell A7, which is the absolute value of the data entered in cells A2:A6.
3. SUMPRODUCT Formula and ABS Function
The SUMPRODUCT function allows us to include the ABS function to provide absolute numbers. Suppose we are given the following data. If we would just use the SUMPRODUCT formula, we would get a negative number as shown below:
However, using ABS Function, we can get the absolute number as a result. The formula to be used would be:
To learn more, launch our free Excel crash course now!
ABS as a VBA Function
If we wish to use the ABSOLUTE function in Excel VBA code, it can be used in the following manner. Let’s assume I need ABS of -600 so the code would be:
Dim LNumber As Double
LNumber = ABS(-600)
Now in the above code, the variable known as LNumber would now contain the value of 600.
Free Excel Course
If you want to learn more Excel functions with your own online instructor, check out CFI’s Free Excel Crash Course! You’ll get step by step tutorials and demonstrations on how to become an Excel power user.
Additional Resources
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional CFI resources:
- Excel Functions for Finance
- Advanced Excel Formulas Course
- Advanced Excel Formulas You Must Know
- Excel Shortcuts for PC and Mac
- See all Excel resources
Article Sources
- ABS Function
We can use SUM ARRAY along with ABS to get the absolute value of a series of numbers in column or row. Suppose we are given a few numbers as below, so in this scenario, the SUM array formula for absolute values would be =SUM(ABS(A2:A6)). Now, select cell A7 in your spreadsheet, and enter the formula ‘=SUM(ABS(A2:A6))’.
Contents
- 1 How do you make an absolute value in Excel?
- 2 What is the absolute value symbol in Excel?
- 3 How do I use F4 in Excel?
- 4 Why is F4 not working in Excel?
- 5 How do I get absolute value on my laptop?
- 6 How do you find the absolute value?
- 7 How do I use F4 without FN?
- 8 How do I use F4 in multiple cells in Excel?
- 9 How do I enable F4 on my laptop?
- 10 How do you type absolute value on a Mac?
- 11 What is the absolute value of |- 19?
- 12 What is the absolute value of |- 8?
- 13 What is the absolute value of |- 2 |?
- 14 What is Daverage in Excel?
- 15 What does Daverage calculate in Excel?
- 16 What is criteria in Daverage?
- 17 How do I turn on my Fn key?
- 18 How do I enable F2 in Excel without FN?
- 19 How do I permanently use the Fn key?
- 20 Does F4 lock cells in Excel?
How do you make an absolute value in Excel?
Create an Absolute Reference
- Click a cell where you want to enter a formula.
- Type = (an equal sign) to begin the formula.
- Select a cell, and then type an arithmetic operator (+, -, *, or /).
- Select another cell, and then press the F4 key to make that cell reference absolute.
What is the absolute value symbol in Excel?
In Excel, there is no absolute value symbol, but there is a special function for getting an absolute value – ABS function. Note. Excel absolute value should not be confused with absolute cell reference. The latter is a special form of a cell address that locks a reference to a given cell.
How do I use F4 in Excel?
How to use F4 in Excel. Using the F4 key in Excel is quite easy. Think of a situation where you have been working on an Excel worksheet and you want to repeat the last action multiple times. All you need to do is press and hold Fn and then press and release the F4 key.
Why is F4 not working in Excel?
The problem isn’t in Excel, it’s in the computer BIOS settings. The function keys are not in function mode, but are in multimedia mode by default! You can change this so that you don’t have to press the combination of Fn+F4 each time you want to lock the cell.
How do I get absolute value on my laptop?
Typing the Absolute Value Sign
On most computer keyboards, you can find the “|” symbol above the backslash, which looks like “”. To type it, simply hold down the shift key and strike the backslash key.
How do you find the absolute value?
The most common way to represent the absolute value of a number or expression is to surround it with the absolute value symbol: two vertical straight lines.
- |6| = 6 means “the absolute value of 6 is 6.”
- |–6| = 6 means “the absolute value of –6 is 6.”
- |–2 – x| means “the absolute value of the expression –2 minus x.”
How do I use F4 without FN?
All you have to do is look on your keyboard and search for any key with a padlock symbol on it. Once you’ve located this key, press the Fn key and the Fn Lock key at the same time. Now, you’ll be able to use your Fn keys without having to press the Fn key to perform functions.
How do I use F4 in multiple cells in Excel?
Either double-click on the cell or press F2 to edit the cell; then hit F4. It works even when you highlight multiple cells. F4 adds the dollar sign to the cell references you’ve highlighted.
How do I enable F4 on my laptop?
How to use the F4 key. Open the program that uses the key and press F4 . If the F4 key also has an icon on the key, it indicates the key has a secondary function. To use the secondary function, press and hold down the Fn key, and while continuing to hold the key, press F4 .
How do you type absolute value on a Mac?
Depending on your keyboard layout, opt-v will give √, and you can just us the pipe | symbol for absolute value.
What is the absolute value of |- 19?
The absolute value is the distance between a number and zero. The distance between −19 and 0 is 19 .
What is the absolute value of |- 8?
8
The absolute value of -8 is 8; |−8|=8 . The absolute value of any number is always positive.
What is the absolute value of |- 2 |?
The absolute value of a negative number is also a positive value. | -2| = 2. Irrespective of the sign of the numeric value, the absolute value is always positive.
What is Daverage in Excel?
The Microsoft Excel DAVERAGE function averages all numbers in a column in a list or database, based on a given criteria. The DAVERAGE function is a built-in function in Excel that is categorized as a Database Function. It can be used as a worksheet function (WS) in Excel.
What does Daverage calculate in Excel?
The DAVERAGE function calculates an average for values in an Excel list. The unique and truly useful feature of DAVERAGE is that you can specify that you want only list records that meet specified criteria included in your average. If you want to calculate a simple average, use the AVERAGE function.
What is criteria in Daverage?
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.
How do I turn on my Fn key?
Depending on your keyboard, you may actually have a dedicated “Fn Lock” key. If you don’t, you may have to press the Fn key and then press an “Fn Lock” key to activate it. For example, on the keyboard below, the Fn Lock key appears as a secondary action on the Esc key. To enable it, we’d hold Fn and press the Esc key.
How do I enable F2 in Excel without FN?
1) Make Use Of The Keyboard Shotcut
keys or Esc key. Once you find it, press the Fn Key + Function Lock key simultaneously to enable or disable the standard F1, F2, … F12 keys. Voila!
How do I permanently use the Fn key?
To enable FN Lock on the All in One Media Keyboard, press the FN key, and the Caps Lock key at the same time. To disable FN Lock, press the FN key, and the Caps Lock key at the same time again.
Does F4 lock cells in Excel?
Drag or copy formula and lock the cell value with the F4 key
For locking the cell reference of a single formula cell, the F4 key can help you easily. Select the formula cell, click on one of the cell reference in the Formula Bar, and press the F4 key. Then the selected cell reference is locked.
The ABS function in Excel returns the absolute value of a number. In other words: the ABS function removes the minus sign (-) from a negative number, making it positive.
1. For example, the ABS function in cell B1 below returns the absolute value of a negative number.
The ABS function has no effect on 0 (zero) or positive numbers.
2. The absolute value of 0 is 0.
3. The absolute value of a positive number is the same positive number.
When do we need the ABS function in Excel?
4. For example, calculate the forecast error (difference between the actual and the forecast value) for each month.
Note: if we look at the sum of these errors (zero), this forecast model seems perfect, but it’s not!
5. Simply use the ABS function to calculate the absolute error for each month.
6. If you don’t want to display the forecast errors on the sheet, use SUMPRODUCT and ABS.
Note: visit our page about the SUMPRODUCT function to learn more about this function.
Let’s take a look at one more cool example.
7. Use the ABS function to calculate the absolute value of each difference.
8. Add the IF function to test if the values are within tolerance.
Explanation: if the difference is less than or equal to 3, the IF function returns 1, else it returns 0.
9. Add icons.
10. Change the tolerance.
Note: visit our page about icon sets to learn more about this topic. To view this formatting rule, download the Excel file. Next, on the Home tab, in the Styles group, click Conditional Formatting, Manage Rules.
Excel Absolute Value (Table of Contents)
- Absolute Value in Excel
- Methods of Absolute Functions in Excel
- How to Use Absolute value in excel?
Absolute Value in Excel
Absolute Value in Excel can be calculated using the ABS function, which is available under the category of Math and Trig in Insert function. Absolute Value is the positive form of any negative value whether is it an integer number or decimal number. To use the ABS function, go to the Insert function option from the Formula menu tab in Excel and select ABS function, or else we can directly select ABS function by going in the edit mode of any cell. Then select those cells that contain negative values as per syntax. We will see, it would get converted into positive absolute value.
Absolute Formula in Excel
Below is the Absolute Formula in Excel :
The Absolute Value Formula in excel has one argument:
- Number – which is used to get the absolute value of the number.
Methods of Absolute Functions in Excel
In Microsoft excel, the ABS function comes under the category of Math and Trigonometric, where we can find the Math and Trigonometric in the Formula menu; we will see how to use the ABS function by following the below steps.
- First, go to the Formulas option.
- In the formula menu, we can see the Math & Trig option.
- Click on the Math & Trig option so that we will get the list of functions which is shown in the below screenshot.
- Click on the first function called ABS.
- We will get the ABS function dialogue box as shown below.
- Select the negative number on the cell as shown in the below screenshot.
- Click OK
- The given negative number will be returned as an absolute positive number.
How to Use Absolute value in excel?
Absolute Value in Excel is very simple and easy to use. Let’s understand the working of excel Absolute Value with some examples.
You can download this Absolute Value Excel Template here – Absolute Value Excel Template
Excel Absolute Value – Example #1
In this example, we are going to see how to use the ABS function by following the below steps.
Consider the below example, which has some random positive and negative numbers.
Now we are going to use the ABS function, which will return the positive number by following the below procedure.
- Click on the Output column.
- Use ABS formula as =ABS(A2) as shown in the below screenshot.
- Press ENTER; we will get the output as follows.
- In the above screenshot, the first row contains a positive number, so there is no difference, and the ABS function returned the absolute value of the number.
- Drag down the formula for all the cell
- We will get the below output as follows.
- As we can see that in the second row, we have a negative number; by using the ABS function, we have converted a negative number to a positive number, and the positive number remains unchanged.
- At last, we can see the VALUE error because the ABS function will throw a VALUE error If the supplied argument is non-numeric.
Excel Absolute Value – Example #2
Using Addition in ABS function
In this example, we are going to see how the ABS function work using SUM. Consider the below example, which has product wise sales figure for three months.
In the above screenshot, we can see that the grand total has been calculated using the SUM formula.
Let us use the ABS function and check for the final grand value by following the below steps.
- First, click on cell C2.
- Insert the ABS function formula as =ABS(B2) shown below.
- Click ENTER.
- The absolute function checks for the number, and it will return the absolute number.
- We will get the output as follows, as shown in the below screenshot.
- Drag down the formula for all the cells so that we will get the final out output as follows.
- As we can see in the above screenshot, the ABS function returned the absolute number and converted the negative number to positive numbers.
- We can notice that the grand total value has a huge difference after using the ABS function because SUM will add the positive numbers and subtract the negative numbers and give the end result.
- Here ABS function converted all negative numbers to positive numbers, and we got the grand total with a positive number.
- Do the same operation and apply the ABS function to the E and H column, and we will get the below result as follows.
In the above result, we can see the Grand total difference after applying the ABS function.
Excel Absolute Value – Example#3
Using Subtraction in ABS function
In this example, we are going to see how the ABS function works in subtraction. Let’s consider the below example, which shows the month-wise sales data of each employee and the difference.
We can notice that we got the difference minus sign figure for the salesperson MAXWELL and the salesperson SMITH in the above screenshot. We have used the subtraction formula as Jan sales value – Feb sales value as shown in the below screenshot.
Here we have used the formulation as =B4-C4 as we cannot subtract lower value with higher value, and while doing sales analysis, this report will go wrong because of the negative figure and also we can see that Average also seems to be wrong due to the negative figure. In order to overcome these errors, we can use the ABS function by following the below steps.
- Click on the D column cell named Difference.
- Use the ABS function as =ABS (B3-C3) will check for the number and return the absolute value shown in the below screenshot.
- Click ENTER, and we will get the output as shown below.
- Drag down the formula for all the cells so that we will get the final output as shown.
- This is the correct way of reporting that the ABS function converted the negative number to a positive number, which gives the exact report.
In the above comparison result, we can see the difference that before applying the ABS function, we got some different figures which is actually an incorrect way of doing subtraction.
We can notice that after applying the ABS function, it returned the absolute value, and we can see the changed in Grand total where it was 735 before and after applying the ABS function, we got the Grand total as 825.
We can notice the same difference in Average where it was 183.7 before and after applying the ABS function; we got an average of 206.25, which is the exact average of the sales report.
Things to Remember
- ABS function in excel normally returns the absolute values. Which converts negative numbers to positive numbers
- While using the ABS function, we can see that positive numbers are unaffected.
- ABS function in excel will throw a #VALUE! error if the supplied argument is non-numeric.
- While using the ABS function, make sure that all arguments are numeric values.
Recommended Articles
This has been a guide to Absolute Value in Excel. Here we discuss how to use the Absolute Value in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –
- ABS Function in Excel
- Excel Absolute Reference
- Relative Reference in Excel
- Statistics in Excel