ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I get absolute values for a range of cells? (https://www.excelbanter.com/excel-discussion-misc-queries/15677-how-do-i-get-absolute-values-range-cells.html)

Terry

How do I get absolute values for a range of cells?
 
I various spreadsheets with a mixture of positive and negative numbers. I
would like to make them absolute values. I believe a macro would be
necessary.

JulieD

Hi Terry

i've just tried this on a SMALL data set - so you might like to test it a
bit more thoroughly before believing in it ... but i selected the range i
wanted to convert to positive values and did
edit / replace
find what: -
replace with: <<leave blank

clicked Replace All

seemed to work.

Cheers
julieD

"Terry" wrote in message
...
I various spreadsheets with a mixture of positive and negative numbers. I
would like to make them absolute values. I believe a macro would be
necessary.




Peo Sjoblom

Not really, you could use a help column and a simple formula

=IF(A1<0,A1*-1,A1)

copy down/across and then copy and paste special as values,
now you could replace the originals with the help column

--

Regards,

Peo Sjoblom


"Terry" wrote in message
...
I various spreadsheets with a mixture of positive and negative numbers. I
would like to make them absolute values. I believe a macro would be
necessary.




Dave O

It's also possible by way of the ABS() function, which returns the
absolute value of whatever is between the brackets (cell reference,
etc). Would it be easier to use a formula than write and maintain a
macro?



All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com