Skip to main content

Conas uimhreacha diúltacha a athrú go dearfach in Excel?

Nuair a bhíonn oibríochtaí á bpróiseáil agat in Excel, uaireanta, b’fhéidir go mbeidh ort na huimhreacha diúltacha a athrú go huimhreacha dearfacha nó a mhalairt. An bhfuil aon chleasanna gasta is féidir leat a chur i bhfeidhm chun uimhreacha diúltacha a athrú go dearfach? Tabharfaidh an t-alt seo na cleasanna seo a leanas duit chun gach uimhir dhiúltach a thiontú go dearfach nó vice versa go héasca.


Athraigh diúltach go huimhreacha dearfacha le feidhm speisialta Greamaigh

Is féidir leat na huimhreacha diúltacha a athrú go huimhreacha dearfacha leis na céimeanna seo a leanas:

1. Iontráil uimhir -1 i gcill bhán, ansin roghnaigh an cill seo, agus brúigh Ctrl + C eochracha chun é a chóipeáil.

2. Roghnaigh gach uimhir dhiúltach sa raon, cliceáil ar dheis, agus roghnaigh Greamaigh Speisialta ... ón roghchlár comhthéacs. Féach an pictiúr:

Nótaí:
(1) Gabháltas Ctrl eochair, is féidir leat gach uimhir dhiúltach a roghnú ach iad a chliceáil ceann ar cheann;
(2) Má tá Kutools for Excel suiteáilte, is féidir leat a Roghnaigh Cealla Speisialta gné chun gach uimhir dhiúltach a roghnú go tapa. Bíodh Triail In Aisce agat!

3. Agus a Greamaigh speisialta taispeánfar bosca dialóige, roghnaigh Gach rogha ó Greamaigh, Roghnaigh Méadaigh rogha ó Oibríocht, Cliceáil OK. Féach an pictiúr:

4. Athrófar na huimhreacha diúltacha uile a roghnófar ina huimhreacha dearfacha. Scrios an uimhir -1 de réir mar is gá duit. Féach an pictiúr:

Athraigh uimhreacha diúltacha go dearfach go dearfach sa raon sonraithe in Excel

Ag déanamh comparáide leis an gcomhartha diúltach a bhaint de chealla ceann ar cheann de láimh, Kutools for Excel's Athraigh Comhartha Luachanna Soláthraíonn gné bealach thar a bheith éasca chun gach uimhir dhiúltach a athrú go tapa go dearfach sa roghnú.


ad diúltach a athrú go dearfach

Kutools for Excel - Supercharge Excel le níos mó ná 300 uirlisí riachtanacha. Bain sult as lán-feiceáil 30-lá triail SAOR IN AISCE gan aon chárta creidmheasa ag teastáil! Get sé anois

Ag baint úsáide as cód VBA chun gach uimhir dhiúltach raon a thiontú go dearfach

Mar ghairmí Excel, is féidir leat an cód VBA a rith freisin chun na huimhreacha diúltacha a athrú go huimhreacha dearfacha.

1. Brúigh eochracha Alt + F11 chun an fhuinneog Microsoft Visual Basic for Applications a oscailt.

2. Beidh fuinneog nua ar taispeáint. Cliceáil Ionsáigh > Modúil, ansin na cóid seo a leanas a ionchur sa mhodúl:

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. Ansin cliceáil Rith cnaipe nó brúigh F5 eochair chun an feidhmchlár a rith, agus athrófar gach uimhir dhiúltach go huimhreacha dearfacha. Féach an pictiúr:


Go tapa agus go héasca athraigh uimhreacha diúltacha go dearfach le Kutools for Excel

Níl an chuid is mó d’úsáideoirí Excel ag iarraidh cód VBA a úsáid, an bhfuil aon chleasanna gasta ann chun na huimhreacha diúltacha a athrú go dearfach? Kutools for excel in ann cabhrú leat go héasca agus go compordach chun é seo a bhaint amach.

Kutools for Excel - Supercharge Excel le níos mó ná 300 uirlisí riachtanacha. Bain sult as lán-feiceáil 30-lá triail SAOR IN AISCE gan aon chárta creidmheasa ag teastáil! Get sé anois

1. Roghnaigh raon lena n-áirítear na huimhreacha diúltacha a theastaíonn uait a athrú, agus cliceáil Kutools > Ábhar > Athraigh Comhartha Luachanna.

2. Seiceáil Athraigh gach luach diúltach go dearfach faoi Oibríocht, agus cliceáil Ok. Féach an pictiúr:

Anois feicfidh tú go n-athróidh na huimhreacha diúltacha go huimhreacha dearfacha mar a thaispeántar thíos:

nótaí: Leis seo Athraigh comhartha Luachanna gné, is féidir leat comharthaí diúltacha rianaithe a shocrú freisin, gach uimhir dhearfach a athrú go diúltach, comhartha na luachanna uile a aisiompú agus gach luach diúltach a athrú go nialas. Bíodh Triail In Aisce agat!

(1) Athraigh go tapa na luachanna dearfacha go diúltach sa raon sonraithe:

(2) Comhartha na luachanna uile sa raon sonraithe a aisiompú go héasca:

(3) Gach luach diúltach a athrú go nialas sa raon sonraithe:

(4) Comharthaí diúltacha rianaithe a shocrú go héasca sa raon sonraithe:

Kutools for Excel - Supercharge Excel le níos mó ná 300 uirlisí riachtanacha. Bain sult as lán-feiceáil 30-lá triail SAOR IN AISCE gan aon chárta creidmheasa ag teastáil! Get sé anois


Taispeántas: Athraigh uimhreacha diúltacha go dearfach nó vice versa le Kutools for Excel


Kutools for Excel: Breis is 300 uirlis láimhe ar do mhéar! Tosaigh do 30-lá triail saor in aisce gan aon teorainneacha gné inniu. Íosluchtaigh Anois!

Earraí coibhneasta:

Uirlisí Táirgiúlachta Oifige is Fearr

Gnéithe Coitianta: Faigh, Aibhsigh nó Aithnigh Dúblaigh   |  Scrios Sraitheanna Bána   |  Comhcheangail Colúin nó Cealla gan Sonraí a Chailleadh   |   Babhta gan Foirmle ...
Cuardaigh Super: Ilchritéir VLookup    VLookup Illuachanna  |   VLookup Trasna Ilbhileoga   |   Amharc doiléir ....
Liosta anuas Casta: Go tapa Cruthaigh Liosta Anuas   |  Liosta anuas Cleithiúnach   |  Liosta Buail Isteach Ilroghnacha ....
Bainisteoir Colún: Cuir Líon Sonrach Colún leis  |  Colúin Bog  |  Scoránaigh Stádas Infheictheachta na gColún Ceilte  |  Déan comparáid idir Raonta & Colúin ...
Gnéithe Réadmhaoin: Fócas Eangaí   |  Amharc Dearaidh   |   Barra Mór na Foirmle    Leabhar Oibre & Bainisteoir Bileog   |  Leabharlann Acmhainní (Uaththéacs)   |  Piocálaí Dáta   |  Comhcheangail Bileoga Oibre   |  Criptigh/Díchriptigh Cealla    Seol Ríomhphost trí Liosta   |  Scagaire Super   |   Scagaire Speisialta (scagaire trom/iodálach/stailc tríd...) ...
Barr 15 Uirlisí12 Téacs uirlisí (Cuir Téacs, Bain Carachtair,...)   |   50 + Cairt cineálacha (Cairt Gantt,...)   |   40+ Praiticiúil Foirmlí (Ríomh aois bunaithe ar lá breithe,...)   |   19 Insertion uirlisí (Cuir isteach Cód QR, Ionsáigh Pictiúr ón gCosán,...)   |   12 Tiontú uirlisí (Uimhreacha le Focail, Comhshó Airgeadra,...)   |   7 Cumaisc & Scoilt uirlisí (Sraitheanna Comhcheangail Casta, Cealla Scoilt,...)   |   ... agus eile

Supercharge Do Scileanna Excel le Kutools for Excel, agus Éifeachtúlacht Taithí Cosúil Riamh Roimhe. Kutools for Excel Tairiscintí os cionn 300 Ardghné chun Táirgiúlacht a Mhéadú agus Am a Shábháil.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

cluaisín kte 201905


Office Tab Tugann sé comhéadan Tabbed chuig Oifig, agus Déan do chuid Oibre i bhfad níos éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
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