# How to Find Absolute Value in Google Sheets [3 Ways]

When working with numerical data, we often need to convert numbers to their absolute values. This is often useful in cases where we are working with distances or when we just want to make sure we have the magnitude of a value, irrespective of sign.

In this tutorial we will look at three ways to find the absolute value in Google Sheets for a given set of numbers:

• Using the ABS Function
• Converting all Negative Numbers to Positive

## What Does Absolute Value Mean?

Absolute Value is the magnitude of a value, without considering its sign. It is a great way to make sure that a given quantity is non-negative.

For example, we can define the distance between two real numbers x and y as |x-y|. Finding the absolute value of this distance ensures we get just the distance between the two quantities, and this result does not differ with respect to which of the two quantities is larger.

Absolute values can also be useful when you want to find the total value of a set of negative and positive numbers. If you want just the total magnitude, the best way would be to find the sum of the absolute values of the numbers in the list.

## How to Find Absolute Value in Google Sheets

Finding the absolute value of any given number simply involves removing the negative sign, if any. This is quite simple if you have a small set of values. You can simply remove the minus sign from each number manually.

However, it’s not so practical when you have a large number of values for which you need to find the absolute value. So, let us look at 4 easy ways to find the absolute values in Google Sheets. We are going to use the following dataset to demonstrate each method:

Note that the above list of numbers contains both positive and negative values.

### Using the ABS Function to Find the Absolute Value in Google Sheets

The ABS function in Google Sheets is specifically used to find the absolute value of a number. The syntax for this function is quite simple:

`ABS(value)`

Here, value is the number for which you want to find the absolute value. This can be a number, a formula or a reference to a cell containing a number.

To find the absolute value for the list shown above, simply type the following formula in cell B2 and copy it down to the rest of the cells using the fill handle:

`=ABS(A2)`

Here’s the result that we get:

Alternatively, you can use the following formula in cell B2 and get the absolute values for all the values in the list in one go:

`=ARRAYFORMULA(ABS(A2:A10))`

### Finding the Absolute Value in Google Sheets by Converting All Negative Numbers to Positive

The absolute value of a number is simply obtained by removing the minus sign (-) from all negative numbers.

In other words, it essentially involves converting all negative numbers to positive. There are a number of ways to get this done in Google Sheets.

One way is to use the IF function to check if the number is less than 0, and if it is, then multiply the number with -1. Otherwise, leave the number as it is.

This means to find the absolute value for our sample list, we need to type the following formula in cell B2 and copy it down to the rest of the cells using the fill handle:

`=IF(A2<0,A2*-1,A2)`

The result can be seen in the screenshot below:

### Using Google Script to Find the Absolute Value in Google Sheets

This method uses a Google script or App Script to quickly convert a list of values to their absolute values. You can use the script given below to quickly convert a list of numbers to their absolute values:

```function findAbsolute() {  var app=SpreadsheetApp;  var ss=app.getActiveSpreadsheet();  var activeSheet=ss.getActiveSheet();  var range=activeSheet.getActiveRange();  var values=range.getValues();  var value;  for (var i in values){    var row=values[i]    for (var j in row) {      value=row[j]      if (value<0){        row_num=parseInt(i)+1;        col_num=parseInt(j)+1;        console.log(value)        console.log(row_num, col_num)        activeSheet.getRange(row_num+1,col_num).setValue(value*(-1));      }    }  }}

```

Note: This script works on the original data, so this method works great if you don’t want to use a separate helper column to write the formula.

To use the above script, simply follow the steps given below:

• Navigate to Extensions->Apps Script from the main menu
• This opens the Apps Script window.
• Replace the code provided with the above code.
• Change the name of the script from ‘Untitled’ to ‘findAbsolute’.
• Save the macro by pressing the shortcut CTRL+S on your keyboard.
• Import this script into your worksheet as a macro by navigating to Extensions->Macros->Import macro.
• Select the name of the function, which is findAbsolute in this case, and press ‘Add Function’.

Now every time you need to convert a list of numbers to their absolute values, simply select the range of cells containing the values you want to convert and navigate to Extensions->Macros->findAbsolute.

The first time you try to run the script, you will be asked for authorization to run the script.

Note: You could also add a button to your sheet and link it to your script, so that every time a user selects a range of cells and clicks on the button, the script runs and converts the selected values to their absolute values.

## Absolute Value vs. Absolute Reference in Google Sheets

A lot of beginners get confused between the terms Absolute value and Absolute reference in Google Sheets, so it is important to understand the difference.

An absolute reference is a cell reference that is locked, making sure that the row and column numbers in the formula containing the cell reference won’t change when copied to another cell. This is different from a relative reference that adjusts the cell reference when the formula is copied to another cell.

To create an absolute reference in Google Sheets, we usually add a dollar sign before the row number and column letter; for example, the cell reference \$A\$2 is an absolute reference. You can also use the absolute reference shortcut, by pressing the F4 key on the keyboard.

In short, an absolute reference refers to the location of the cell containing a value. An absolute value, on the other hand, refers to the actual value in its pure form, without any negative or positive signs.

## Conclusion

In this tutorial we showed you three ways to find the absolute value in Google Sheets.

The first two methods use formulas, so they work great when you want to get the absolute values in a separate column and retain the original values. The third method, on the other hand, uses a Google Sheets app script to convert the original set of values into their absolute values.

We hope you find this tutorial helpful and easy to follow.

#### Most Popular Posts #### Nahid Akhter

Nahid Akhter is a writer, programmer, and online course content creator. She has an MS in Computer Science and has been in the education line for more than 14 years. Her specialization is in programming and Tech-writing, and her areas of interest include Office productivity, Artificial Intelligence, and Web design and development.
##### Related Posts

Disclosure: Spreadsheet Point is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8211623,"math_prob":0.8997204,"size":6927,"snap":"2023-40-2023-50","text_gpt3_token_len":1466,"char_repetition_ratio":0.17434639,"word_repetition_ratio":0.07124895,"special_character_ratio":0.21163563,"punctuation_ratio":0.092047125,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9815678,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-25T12:05:34Z\",\"WARC-Record-ID\":\"<urn:uuid:95a9988d-e54c-4bab-aa21-c5632d8f0bd2>\",\"Content-Length\":\"377524\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:149a8f74-688b-4d0a-b83e-4c81e13683f2>\",\"WARC-Concurrent-To\":\"<urn:uuid:95b935b9-f5fc-4f89-9cd1-06ae6a531ba4>\",\"WARC-IP-Address\":\"162.159.135.42\",\"WARC-Target-URI\":\"https://spreadsheetpoint.com/how-to-find-absolute-value-google-sheets/\",\"WARC-Payload-Digest\":\"sha1:5EABHYXKKBWVNTTERP3V3ZUSJBQS75HS\",\"WARC-Block-Digest\":\"sha1:HNVCSAPMY4ZSFT27GKR23MH2BI4OBID6\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233508977.50_warc_CC-MAIN-20230925115505-20230925145505-00334.warc.gz\"}"}