Перейти к основному содержанию

Как изменить отрицательные числа на положительные в Excel?

Когда вы обрабатываете операции в Excel, иногда вам может потребоваться заменить отрицательные числа на положительные или наоборот. Есть ли какие-нибудь быстрые приемы, которые можно применить для изменения отрицательных чисел на положительные? Эта статья познакомит вас со следующими трюками для простого преобразования всех отрицательных чисел в положительные и наоборот.

Измените отрицательные числа на положительные с помощью специальной функции Вставить

Легко изменить отрицательные числа на положительные с помощью Kutools for Excel

Использование кода VBA для преобразования всех отрицательных чисел диапазона в положительные


Измените отрицательные числа на положительные с помощью специальной функции Вставить

Вы можете изменить отрицательные числа на положительные, выполнив следующие действия:

1. Введите номер -1 в пустой ячейке, затем выберите эту ячейку и нажмите Ctrl + C ключи для его копирования.

2. Выделите все отрицательные числа в диапазоне, щелкните правой кнопкой мыши и выберите Специальная ... из контекстного меню. Смотрите скриншот:

Ноты:
(1) Удержание Ctrl клавишу, вы можете выбрать все отрицательные числа, щелкая их по одному;
(2) Если у вас установлен Kutools for Excel, вы можете применить его Выберите специальные ячейки функция быстрого выбора всех отрицательных чисел. Получите бесплатную пробную версию!

3, И Специальная вставка появится диалоговое окно, выберите Все вариант из Вставить, наведите на Размножаться вариант из Эксплуатация, нажмите OK. Смотрите скриншот:

4. Все выбранные отрицательные числа будут преобразованы в положительные числа. Удалите число -1, как вам нужно. Смотрите скриншот:

Легко изменить отрицательные числа на положительные в указанном диапазоне в Excel

По сравнению с удалением отрицательного знака из ячеек по одной вручную, Kutools for Excel's Изменить знак ценностей Функция предоставляет чрезвычайно простой способ быстро изменить все отрицательные числа на положительные при выборе. Получите 30-дневную бесплатную пробную версию прямо сейчас!

объявление преобразовать отрицательное в положительное

Kutools for Excel - Дополните Excel более чем 300 основными инструментами. Наслаждайтесь полнофункциональной 30-дневной БЕСПЛАТНОЙ пробной версией без необходимости использования кредитной карты! Get It Now


Быстро и легко изменить отрицательные числа на положительные с помощью Kutools for Excel

Большинство пользователей Excel не хотят использовать код VBA, есть ли какие-нибудь быстрые приемы для изменения отрицательных чисел на положительные? Kutools для excel может помочь вам легко и комфортно добиться этого.

Kutools for Excel - Дополните Excel более чем 300 основными инструментами. Наслаждайтесь полнофункциональной 30-дневной БЕСПЛАТНОЙ пробной версией без необходимости использования кредитной карты! Get It Now

1. Выберите диапазон, содержащий отрицательные числа, которые вы хотите изменить, и нажмите Кутулс > Содержание > Изменить знак ценностей.

2. Проверить Измените все отрицательные значения на положительные под Эксплуатацияи нажмите Ok. Смотрите скриншот:

Теперь вы увидите, что все отрицательные числа меняются на положительные, как показано ниже:

Внимание: С этим Изменить знак ценностей вы также можете исправить отрицательные знаки в конце, изменить все положительные числа на отрицательные, поменять местами знак всех значений и изменить все отрицательные значения на ноль. Получите бесплатную пробную версию!

(1) Быстро измените все положительные значения на отрицательные в указанном диапазоне:

(2) Легко изменить знак всех значений в указанном диапазоне:

(3) Легко изменить все отрицательные значения на ноль в указанном диапазоне:

(4) Легко исправить конечные отрицательные знаки в указанном диапазоне:

Функции: Чтобы использовать эту функцию, вам необходимо установить Kutools for Excel во-первых, пожалуйста нажмите, чтобы загрузить и получить 30-дневную бесплатную пробную версию сейчас.

Использование кода VBA для преобразования всех отрицательных чисел диапазона в положительные

Как профессионал в Excel, вы также можете запустить код VBA, чтобы изменить отрицательные числа на положительные.

1. Нажмите клавиши Alt + F11, чтобы открыть окно Microsoft Visual Basic для приложений.

2. Откроется новое окно. Нажмите Вставить > Модули, затем введите в модуль следующие коды:

Sub Positive
Dim Cel As Range
For Each Cel In Selection
If IsNumeric(Cel.Value) Then
Cel.Value = Abs(Cel.Value)
End If
Next Cel
End Sub

3. Затем нажмите Run или нажмите F5 нажмите клавишу для запуска приложения, и все отрицательные числа будут заменены на положительные. Смотрите скриншот:


Демо: измените отрицательные числа на положительные или наоборот с помощью Kutools for Excel


Kutools for Excel: Более 300 удобных инструментов у вас под рукой! Начните 30-дневную бесплатную пробную версию без ограничений сегодня. Скачать
Comments (31)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
=sqrt((numbers)^2)
This comment was minimized by the moderator on the site
Hi Kevin Alexander,
The SQRT function is a good way. However, if you want to convert a negative number to positive by excel formula/function, you can use the ABS function directly, =ABS(your_negative_number). For example, =ABS(-5) will return 5.
This comment was minimized by the moderator on the site
I chose a simpler solution, no formulas needed. First, to preserve the original data in case I goofed up, I copied the raw CMM measurement data in Worksheet 1 to Worksheet 2. Next, In Worksheet 2, I selected the multiple disconnected blocks of cells which had some negative numbers I wanted to convert to positive numbers. Then, I simply used the “replace” function to replace the minus sign with … nothing! It worked perfectly, and was clean; no formulas, no conditional formatting, and the raw unaltered data remained on Worksheet 1 as my backup resource. Applying a formula is not always the answer. I love using Excel to do data logging, tracking, analysis, and to answer so many math questions, both at work and personally. At work, I measure parts, and the machine measures distances to the left as negative numbers, and not just a positive number distance. Other measurements, though, are at a position of being on a datum X or Y, at zero. Those measurements will be off zero in the positive or negative direction, and I need hose occasional negative numbers to remain negative. That meant I had to select a partial column here, another there, and skip ones that measured around a zero target, then apply that “negative sign removal) to only those measurements that were negatives, but did not have zero as the target dimension. It is probably confusing until actually seeing the spreadsheet I was fixing, but the method I chose worked perfectly, and had no formula involved, just a clean minus-sign removal done as a “replace” edit. Thank you, Joel
This comment was minimized by the moderator on the site
Thank you so much!
This comment was minimized by the moderator on the site
use this formula (A1 is a cell reference in which you want to convert) =max(A1,-A1) What this formula does is to choose the highest number, and positive will normally be the highest number.
This comment was minimized by the moderator on the site
Taimoor, Your solution requires adding a column of formulas. The easiest way is to use "find and replace", as I explained here on 4/20/16. Enter a dash in the first line, nothing in the second, and replace as many of them as you want ("find next" or "replace all"). Not "complexed" at all. Your method creates clutter on the spreadsheet with a new column of formulas that requires the first column of negative numbers to remain, although it is now just a sub-component of the formulas column. Then, if you want to clean up the spreadsheet, you would have to hide that first column of negative numbers. Messy. No thank you. You say other people's methods are "complexed", but yours is not, IMHO, much, if any, of an improvement.
This comment was minimized by the moderator on the site
"Formulas? We don' need no ... " Click on Find and Replace. Enter a dash in the "Find What" section. Leave the "Replace With" section blank. Click "Replace All" and BAM! Negativity" gone. If you want to play it safe, and aren't sure about whether or not you will muck up your spreadsheet, copy Sheet 1 to Sheet 2, then perform the Find and Replace action with Sheet 2. If you like it, copy what you want and paste it back into Sheet 1. Safe as can be!
This comment was minimized by the moderator on the site
Click on that Negative Number. Right Click & go on Format Cell & click on 1234.
This comment was minimized by the moderator on the site
Sachin, when you go to "Format Cell, and do as you suggested, that does not change the value of the number, it will only change the format, the color. And you left out a couple steps: 1. what tab to click on (number?), and 2. what category in that tab do you choose, then 3. which style option do you select (which still will not change the VALUE of the number, only the appearance (negative numbers showing in red, for example).
This comment was minimized by the moderator on the site
It's so simple. Don't know why it's been explained in such a complexed manner. Suppose you have a column A with following values: Cell A: A2= -4000 A3= -5000 A4= -8000 Apply the formula in cell B2 =A2*(-1) And drag it down till the last value of column A. Done!
This comment was minimized by the moderator on the site
Just did the copy/paste -1 onto highlighted positive numbers and puff, like magic my job is done here. Big time saver big help
This comment was minimized by the moderator on the site
I've found highlighting the column hitting ctrl F, then replacing - with nothing will remove the -. Its easy
This comment was minimized by the moderator on the site
It is so simple if you multiply -1 with the value or column and drag the formula :)
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations