Last week, I got an email from one of my subscribers with a question.
You know, the thing for which he asked is a common kind of task.
I am sure, this often happens with you, when you get some numeric values which are in negative, and after that, you convert them into positive.
There is no #rocketscience in this.
But have you ever checked how my different methods you have to do this? Well, I am always curious to know about different methods to do a task in Excel.
So, this time I grabbed a paper and listed all the methods which I can use to convert a negative number into positive.
And, you will be amazed that I have got 7 different ways which you can use to deal with negative numbers.
So, today in this post, I’d like to share all those methods with you.
Unlike me, if you are good at maths, I am sure you know that when you multiply two minus signs with each other, the result is always positive.
So, you can use the same method in excel to convert a negative number into positive. All you have to do just multiply a negative value with -1 and it will return the positive number instead of negative.
Below you have a range of cells with negative numbers. So, to convert them into positive you just need to enter the formula in cell B2 and drag it up to the last cell.
Note: If you have mixed numbers (both positive and negative) then you can use below method, instead if below one.
You just have to refer a negative number into the function and it will turn it into a positive value.
Note: This function works even when you have mixed numbers (both positive and negative).
Now, all the negative number are converted into positive.
The only thing you need to take care is that this is not a dynamic method. So, you need to do it again and again if you frequently update your data.
But this method is quick and easy to use, and you don’t need any formula.
I am sure you have used flash fill once in your lifetime. And if not, you must use it, it’s a game change. This is an insane method to turn negative numbers into positive.
Here are the steps.
Congratulations, you have converted all the negative numbers into positive with flash fill.
Note: This method is also not a dynamic one, but quick and easy to use.
This is also a possibility that instead of converting a negative number you just want to show it as a positive number. And in this situation, you can use custom formatting.
Here are the steps to this.
This will show all the negative numbers as positive. But, in actual these all are still negative number, just formatting is changed.
If you select a cell and look at the formula bar, you can check, it’s still a negative number. So, when you use it in further calculation it will act as a negative number.
Sub numberP2N() Dim myCell As Range For Each myCell In Selection If myCell.Value <> "" Then If IsNumeric(myCell.Value) Then myCell.Value = Abs(myCell.Value) End If End If Next myCell End Sub
Note: Once you run this code you can’t undo your action.
Yes, you can use power query to convert a negative number into a positive number. And, the best part is it’s a one-time setup.
Just follow these simple steps.
As I said, to turn a negative number into a positive number you don't need to use rocket science.
Even one method can be sufficient, but I have listed all these methods to help you to handle different situations.
I am sure you found all these methods helpful.
Now, you have to do one thing for me.
Do you know any other method for this?
Please share your views with me in the comment section. I'd love to hear from you. And, please don’t forget to share it with your friends, I am sure they will appreciate it.