ไปยังเนื้อหาหลัก

จะเปลี่ยนตัวเลขเชิงลบเป็นบวกใน Excel ได้อย่างไร?

เมื่อคุณกำลังประมวลผลการดำเนินการใน Excel บางครั้งคุณอาจต้องเปลี่ยนตัวเลขเชิงลบเป็นตัวเลขบวกหรือในทางกลับกัน มีกลเม็ดง่ายๆที่คุณสามารถใช้เพื่อเปลี่ยนจำนวนลบเป็นบวกได้หรือไม่? บทความนี้จะแนะนำเคล็ดลับต่อไปนี้สำหรับการแปลงจำนวนลบทั้งหมดให้เป็นบวกหรือในทางกลับกันอย่างง่ายดาย

เปลี่ยนจำนวนลบเป็นบวกด้วยฟังก์ชันพิเศษวาง

เปลี่ยนตัวเลขเชิงลบเป็นบวกได้อย่างง่ายดายด้วย Kutools for Excel

ใช้รหัส VBA เพื่อแปลงจำนวนลบทั้งหมดของช่วงเป็นบวก


เปลี่ยนจำนวนลบเป็นบวกด้วยฟังก์ชันพิเศษวาง

คุณสามารถเปลี่ยนจำนวนลบเป็นจำนวนบวกได้โดยทำตามขั้นตอนต่อไปนี้:

1. ป้อนหมายเลข -1 ในเซลล์ว่างจากนั้นเลือกเซลล์นี้แล้วกด Ctrl + C คีย์เพื่อคัดลอก

2. เลือกจำนวนลบทั้งหมดในช่วงนั้นคลิกขวาแล้วเลือก วางพิเศษ ... จากเมนูบริบท ดูภาพหน้าจอ:

หมายเหตุ:
(1) การถือครอง Ctrl คุณสามารถเลือกตัวเลขเชิงลบทั้งหมดโดยคลิกทีละตัว
(2) หากคุณติดตั้ง Kutools for Excel ไว้คุณสามารถใช้ไฟล์ เลือกเซลล์พิเศษ คุณสมบัติในการเลือกจำนวนลบทั้งหมดอย่างรวดเร็ว ทดลองใช้ฟรี!

3. และ a วางแบบพิเศษ กล่องโต้ตอบจะปรากฏขึ้นให้เลือก ทั้งหมด ตัวเลือกจาก พาสต้าให้เลือก คูณ ตัวเลือกจาก การดำเนินการคลิก OK. ดูภาพหน้าจอ:

4. จำนวนลบที่เลือกทั้งหมดจะถูกแปลงเป็นจำนวนบวก ลบหมายเลข -1 ตามที่คุณต้องการ ดูภาพหน้าจอ:

เปลี่ยนตัวเลขเชิงลบเป็นบวกได้อย่างง่ายดายในช่วงที่ระบุใน Excel

เมื่อเปรียบเทียบกับการลบเครื่องหมายลบออกจากเซลล์ทีละเซลล์ด้วยตนเอง Kutools for Excel's เปลี่ยนสัญลักษณ์ของค่า คุณลักษณะนี้เป็นวิธีที่ง่ายมากในการเปลี่ยนตัวเลขเชิงลบทั้งหมดเป็นค่าบวกในการเลือกอย่างรวดเร็ว ทดลองใช้ฟีเจอร์เต็มรูปแบบฟรี 30 วันทันที!

โฆษณาแปลงค่าลบเป็นบวก

Kutools สำหรับ Excel - เพิ่มประสิทธิภาพ Excel ด้วยเครื่องมือที่จำเป็นมากกว่า 300 รายการ เพลิดเพลินกับฟีเจอร์ทดลองใช้ฟรี 30 วันโดยไม่ต้องใช้บัตรเครดิต! Get It Now


เปลี่ยนตัวเลขเชิงลบให้เป็นบวกได้อย่างรวดเร็วและง่ายดายด้วย Kutools for Excel

ผู้ใช้ Excel ส่วนใหญ่ไม่ต้องการใช้โค้ด VBA มีเคล็ดลับง่ายๆในการเปลี่ยนตัวเลขเชิงลบเป็นบวกหรือไม่? Kutools สำหรับ excel สามารถช่วยให้คุณบรรลุเป้าหมายนี้ได้อย่างง่ายดายและสะดวกสบาย

Kutools สำหรับ Excel - เพิ่มประสิทธิภาพ Excel ด้วยเครื่องมือที่จำเป็นมากกว่า 300 รายการ เพลิดเพลินกับฟีเจอร์ทดลองใช้ฟรี 30 วันโดยไม่ต้องใช้บัตรเครดิต! Get It Now

1. เลือกช่วงซึ่งรวมถึงตัวเลขเชิงลบที่คุณต้องการเปลี่ยนแล้วคลิก Kutools > คอนเทนต์ > เปลี่ยนสัญลักษณ์ของค่า.

2. การตรวจสอบ เปลี่ยนค่าลบทั้งหมดเป็นค่าบวก ภายใต้ การดำเนินการและคลิก Ok. ดูภาพหน้าจอ:

ตอนนี้คุณจะเห็นตัวเลขเชิงลบทั้งหมดเปลี่ยนเป็นตัวเลขบวกดังที่แสดงด้านล่าง:

หมายเหตุ: ด้วยสิ่งนี้ เปลี่ยนสัญลักษณ์ของค่า คุณยังสามารถแก้ไขเครื่องหมายลบต่อท้ายเปลี่ยนตัวเลขบวกทั้งหมดเป็นลบย้อนกลับเครื่องหมายของค่าทั้งหมดและเปลี่ยนค่าลบทั้งหมดเป็นศูนย์ ทดลองใช้ฟรี!

(1) เปลี่ยนค่าบวกทั้งหมดเป็นค่าลบอย่างรวดเร็วในช่วงที่ระบุ:

(2) ย้อนกลับสัญลักษณ์ของค่าทั้งหมดในช่วงที่ระบุได้อย่างง่ายดาย:

(3) เปลี่ยนค่าลบทั้งหมดเป็นศูนย์ในช่วงที่ระบุได้อย่างง่ายดาย:

(4) แก้ไขเครื่องหมายเชิงลบต่อท้ายในช่วงที่ระบุได้อย่างง่ายดาย:

ปลาย: หากต้องการใช้คุณสมบัตินี้ คุณควรติดตั้ง Kutools สำหรับ Excel ก่อนอื่นโปรด คลิกเพื่อดาวน์โหลดและทดลองใช้ฟรี 30 วัน ขณะนี้

ใช้รหัส VBA เพื่อแปลงจำนวนลบทั้งหมดของช่วงเป็นบวก

ในฐานะผู้เชี่ยวชาญของ Excel คุณสามารถเรียกใช้รหัส VBA เพื่อเปลี่ยนตัวเลขเชิงลบเป็นตัวเลขบวกได้

1. กด Alt + F11 เพื่อเปิดหน้าต่าง Microsoft Visual Basic for Applications

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. จากนั้นคลิก วิ่ง หรือกด F5 คีย์เพื่อเรียกใช้แอปพลิเคชันและตัวเลขเชิงลบทั้งหมดจะเปลี่ยนเป็นตัวเลขบวก ดูภาพหน้าจอ:


การสาธิต: เปลี่ยนตัวเลขเชิงลบเป็นบวกหรือในทางกลับกันด้วย Kutools for Excel


Kutools สำหรับ Excel: เครื่องมือแสนสะดวกกว่า 300 รายการอยู่แค่เพียงปลายนิ้วสัมผัส! เริ่มทดลองใช้ฟรี 30 วันโดยไม่มีข้อจำกัดด้านฟีเจอร์ตั้งแต่วันนี้ 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