Bỏ qua nội dung chính

Làm thế nào để thay đổi số âm thành số dương trong Excel?

Tác giả: Hỗ trợ kỹ thuật Sửa đổi lần cuối: 2023-12-18

Khi bạn xử lý các hoạt động trong Excel, đôi khi, bạn có thể cần phải thay đổi số âm thành số dương hoặc ngược lại. Có bất kỳ thủ thuật nhanh nào bạn có thể áp dụng để đổi số âm thành số dương không? Bài viết này sẽ giới thiệu cho bạn các thủ thuật sau đây để chuyển đổi tất cả các số âm sang số dương hoặc ngược lại một cách dễ dàng.

Thay đổi số âm thành số dương với chức năng Dán đặc biệt

Dễ dàng thay đổi số âm thành số dương với Kutools cho Excel

Sử dụng mã VBA để chuyển đổi tất cả các số âm của một dải ô thành số dương


Thay đổi số âm thành số dương với chức năng Dán đặc biệt

Bạn có thể thay đổi số âm thành số dương bằng các bước sau:

1. Nhập số -1 trong một ô trống, sau đó chọn ô này và nhấn Ctrl + C phím để sao chép nó.

2. Chọn tất cả các số âm trong phạm vi, nhấp chuột phải và chọn Dán đặc biệt ... từ menu ngữ cảnh. Xem ảnh chụp màn hình:

Ghi chú:
(1) Tổ chức Ctrl chính, bạn có thể chọn tất cả các số âm bằng cách nhấp vào từng số một;
(2) Nếu bạn đã cài đặt Kutools cho Excel, bạn có thể áp dụng Chọn các ô đặc biệt tính năng chọn tất cả các số âm một cách nhanh chóng. Có một bản dùng thử miễn phí!

3. Và một Dán đặc biệt hộp thoại sẽ được hiển thị, chọn Tất cả tùy chọn từ Dán, lựa chọn Nhân tùy chọn từ hoạt động, Click OK. Xem ảnh chụp màn hình:

4. Tất cả các số âm đã chọn sẽ được chuyển thành số dương. Xóa số -1 khi bạn cần. Xem ảnh chụp màn hình:

Dễ dàng thay đổi số âm thành số dương trong phạm vi được chỉ định trong Excel

So sánh với việc loại bỏ dấu âm khỏi từng ô theo cách thủ công, Kutools cho Excel's Thay đổi dấu hiệu giá trị tính năng cung cấp một cách cực kỳ dễ dàng để nhanh chóng thay đổi tất cả các số âm thành số dương trong lựa chọn. Nhận bản dùng thử miễn phí đầy đủ tính năng trong 30 ngày ngay bây giờ!

quảng cáo chuyển đổi từ tiêu cực sang tích cực

Kutools cho Excel - Supercharge Excel với hơn 300 công cụ thiết yếu. Tận hưởng bản dùng thử MIỄN PHÍ 30 ngày đầy đủ tính năng mà không cần thẻ tín dụng! Get It Now


Nhanh chóng và dễ dàng thay đổi số âm sang số dương với Kutools cho Excel

Hầu hết người dùng Excel không muốn sử dụng mã VBA, có thủ thuật nhanh chóng nào để thay đổi số âm thành số dương không? Kutools cho excel có thể giúp bạn đạt được điều này một cách dễ dàng và thoải mái.

Kutools cho Excel - Supercharge Excel với hơn 300 công cụ thiết yếu. Tận hưởng bản dùng thử MIỄN PHÍ 30 ngày đầy đủ tính năng mà không cần thẻ tín dụng! Get It Now

1. Chọn một phạm vi bao gồm các số âm bạn muốn thay đổi và nhấp vào Kutools > Nội dung > Thay đổi dấu hiệu giá trị.

2. Kiểm tra Thay đổi tất cả các giá trị âm thành dương Dưới hoạt động, Và nhấp vào Ok. Xem ảnh chụp màn hình:

Bây giờ bạn sẽ thấy tất cả các số âm chuyển thành số dương như hình dưới đây:

Chú thích: Với cái này Thay đổi dấu hiệu giá trị tính năng, bạn cũng có thể sửa các dấu âm theo sau, thay đổi tất cả các số dương thành âm, đảo ngược dấu của tất cả các giá trị và thay đổi tất cả các giá trị âm thành không. Có một bản dùng thử miễn phí!

(1) Nhanh chóng thay đổi tất cả các giá trị dương thành âm trong phạm vi được chỉ định:

(2) Dễ dàng đảo ngược dấu hiệu của tất cả các giá trị trong phạm vi được chỉ định:

(3) Dễ dàng thay đổi tất cả các giá trị âm thành XNUMX trong phạm vi được chỉ định:

(4) Dễ dàng sửa chữa các dấu hiệu tiêu cực theo sau trong phạm vi được chỉ định:

Mẹo: Để sử dụng tính năng này, bạn nên cài đặt Kutools cho Excel đầu tiên, xin vui lòng nhấp để tải xuống và dùng thử miễn phí 30 ngày ngay bây giờ.

Sử dụng mã VBA để chuyển đổi tất cả các số âm của một dải ô thành số dương

Là một chuyên gia Excel, bạn cũng có thể chạy mã VBA để thay đổi số âm thành số dương.

1. Nhấn các phím Alt + F11 để mở cửa sổ Microsoft Visual Basic for Applications.

2. Sẽ có một cửa sổ mới hiển thị. Nhấp chuột Chèn > Mô-đun, sau đó nhập các mã sau vào mô-đun:

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. Sau đó nhấn vào chạy nút hoặc bấm F5 phím để chạy ứng dụng và tất cả các số âm sẽ được chuyển thành số dương. Xem ảnh chụp màn hình:


Demo: Thay đổi số âm thành số dương hoặc ngược lại với Kutools cho Excel


Kutools cho Excel: Hơn 300 công cụ tiện dụng trong tầm tay bạn! Bắt đầu dùng thử miễn phí 30 ngày không có giới hạn tính năng ngay hôm nay. Download Now!
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