![]() |
Invert Negative number?
Hello I'm just wondering if there is a built-in VBA function that'll invert
negative numbers so for example: -654 becomes 654. Thanks for any help thrown my way. Nate |
Invert Negative number?
ABS(num)
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "NateBuckley" wrote in message ... Hello I'm just wondering if there is a built-in VBA function that'll invert negative numbers so for example: -654 becomes 654. Thanks for any help thrown my way. Nate |
Invert Negative number?
ABS
"NateBuckley" wrote: Hello I'm just wondering if there is a built-in VBA function that'll invert negative numbers so for example: -654 becomes 654. Thanks for any help thrown my way. Nate |
Invert Negative number?
How about the Absolute function? For example, if A1 = -654
=Abs(A1) in another cell yields 654. Hope this helps, Hutch "NateBuckley" wrote: Hello I'm just wondering if there is a built-in VBA function that'll invert negative numbers so for example: -654 becomes 654. Thanks for any help thrown my way. Nate |
Invert Negative number?
x=-x
-- Gary''s Student - gsnu200794 "NateBuckley" wrote: Hello I'm just wondering if there is a built-in VBA function that'll invert negative numbers so for example: -654 becomes 654. Thanks for any help thrown my way. Nate |
Invert Negative number?
If by 'invert' you mean to negate negative numbers, use the ABS() function
then all conversions result in positive values. If you mean to swap positive for negative (or vice versa) use the suggested x = -x or X = X*(-1). Hope this helps |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com