How to turn negative value in excel into a positive one

I have a value that I moved from another worksheet and it is negative, but I need it to be positive. How do I do that?

@olsonse

Hey,

use math.abs(NegativeNumber)

After you’ve read the data (in this example into variable MyVar of type String), you can convert it with Math.Abs(CDbl(MyVar)).

2 Likes

can you show me what you mean?

You can use exactly the code I’ve posted, as long as you’ve read the data into a variable. To get the data, you’ll need to use read range before setting the variable and to write the data, you’ll need to use write range.

1 Like