Skip i'r prif gynnwys

Sut i gadw neu ddileu seroau blaenllaw yn Excel?

Yn gyffredinol, pan fyddwn yn teipio rhif sy'n cynnwys seroau blaenllaw fel 00032423 i mewn i gell, gall ddangos fel 32423. A sut allwch chi gadw'r seroau blaenllaw hyn yn Excel? Ac i'r gwrthwyneb, sut allwch chi ddileu'r seroau blaenllaw pan nad oes angen i chi eu dangos?

Cadwch sero blaenllaw gyda Chelloedd Fformat

Dileu seroau blaenllaw gyda VBA

Dileu sero blaenllaw gyda Kutools ar gyfer Excel trwy gliciau syniad da3

Ychwanegu / Dileu yr un sero blaenllaw â Kutools ar gyfer Excel


swigen dde glas saeth Cadwch sero blaenllaw gyda Chelloedd Fformat

Os ydych chi am gadw'r seroau blaenllaw yn Excel, does ond angen i chi fformatio'r celloedd fel Testun sy'n ffurfio er mwyn i chi deipio'r data.

1. Dewiswch y celloedd amrediad rydych chi am deipio'r data gyda seroau blaenllaw ynddynt, a clcik dde i'w dewis Celloedd Fformat o'r ddewislen cyd-destun. Gweler y screenshot:

doc-cadw-dileu-arwain-zeor-1

2. Yn y Celloedd Fformat deialog, cliciwch Nifer tab, a dewis Testun oddi wrth y Categori cwarel. Cliciwch OK i gau'r ymgom. Gweler y screenshot:

doc-cadw-dileu-arwain-zeor-2

Nawr pan fyddwch chi'n teipio rhifau â seroau arweiniol i'r celloedd amrediad, bydd y seroau blaenllaw yn cael eu cadw yn y celloedd. Gweler y screenshot:

doc-cadw-dileu-arwain-zeor-3

Nodyn: Ni all y dull hwn weithio os ydych chi'n fformatio celloedd fel testun ar ôl teipio rhifau.


Un clic i gael gwared ar yr holl seroau blaenllaw o gelloedd yn Excel

Un clic yn unig, mae holl seroau blaenllaw'r celloedd mewn seletion wedi'u tynnu.  Cliciwch am 30 diwrnod o dreial am ddim!
doc remov yn arwain sero
 
Kutools ar gyfer Excel: gyda mwy na 300 o ychwanegion Excel defnyddiol, am ddim i geisio heb unrhyw gyfyngiad mewn 30 diwrnod.

swigen dde glas saeth Dileu seroau blaenllaw gyda VBA

Os ydych chi am ddileu'r seroau blaenllaw yn Excel, mae gennych bedwar dull i'w ddatrys.

Dull 1 Fformatio celloedd fel fformatio rhifau

Dewiswch yr ystod rydych chi am deipio rhif heb ddangos seroau blaenllaw, a chliciwch ar y dde i glicio Celloedd Fformat i agor Celloedd Fformat deialog, a dewis Nifer oddi wrth y Categori cwarel, yna cliciwch OK. 

Nodyn: Ni all y dull hwn weithio os ydych chi'n fformatio celloedd ar ôl teipio rhif.

Dull 2 ​​Defnyddiwch fformiwla

Dewiswch gell wag wrth ymyl y celloedd amrediad rydych chi wedi teipio'r rhifau â seroau blaenllaw, a theipiwch y fformiwla hon = GWERTH (A1) (Mae A1 yn nodi bod y gell yn cynnwys rhifau â seroau blaenllaw) i mewn iddi. A gwasgwch Rhowch botwm, nawr dangosir y rhif heb arwain sero yn y gell fformiwla. Gweler y screenshot:

doc-cadw-dileu-arwain-zeor-4

Dull 3 Rhedeg VBA

1. Gwasgwch Alt + F11 i arddangos y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Yn y ffenestr, cliciwch Mewnosod > Modiwlau i ddangos ffenestr modiwl newydd, yna copïwch y cod VBA canlynol i mewn i ffenestr y modiwl.

VBA: Dileu seroau blaenllaw yn Excel

Sub DeleteZero()
'updateby20140616
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
WorkRng.NumberFormat = "General"
WorkRng.Value = WorkRng.Value
End Sub
3. Cliciwch Run botwm, ac mae deialog KutoolsforExcel yn galw allan i chi ddewis ystod i ddileu seroau blaenllaw. Gweler y screenshot:

doc-cadw-dileu-arwain-zeor-5

4. Cliciwch OK. Yna tynnir y seroau blaenllaw wrth ddewis.

Dull 4 Defnyddiwch nodwedd Trosi i Rif

Dewiswch y celloedd amrediad sy'n cael eu llenwi â rhifau â seroau blaenllaw, cliciwch yr eicon rhybuddio ar wahân i'r dewis, ac yna dewiswch y Trosi i Rif o'r ddewislen cyd-destun. Gweler y sgrinlun:

doc-cadw-dileu-arwain-zeor-6


swigen dde glas saeth Dileu sero blaenllaw gyda Kutools ar gyfer Excel trwy gliciau

Kutools ar gyfer Excel, gyda mwy na 200 swyddogaethau defnyddiol, yn gwneud eich swyddi yn haws. 

Ar ôl gosod Kutools ar gyfer Excel, gwnewch fel isod:(Lawrlwythiad Am Ddim Kutools ar gyfer Excel Nawr!)

Os oes gennych Kutools ar gyfer Excel, gallwch chi ddileu'r holl seroau blaenllaw yn gyflym o destunau gyda dau glic wrth ei Tynnwch Seros Arweiniol cyfleustodau

Dewiswch y testun rydych chi am ddileu'r seroau blaenllaw, ac yna cliciwch Kutools > Testun > Tynnwch Seros Arweiniol. Gweler y screenshot:
dileu dileu seroau blaenllaw 01

Yna mae deialog yn galw allan i atgoffa bod y seroau blaenllaw wedi'u tynnu o faint o gelloedd. Gweler y screenshot:
dileu dileu seroau blaenllaw 02

Cliciwch OK i gau'r ymgom.

swigen dde glas saeth Dileu Seros Arweiniol




swigen dde glas saeth Ychwanegu / Dileu sero blaenllaw gyda Kutools ar gyfer Excel

Os ydych chi am ychwanegu neu ddileu'r un nifer o seroau blaenllaw i gell, gallwch wneud cais Kutools ar gyfer Excel's Ychwanegu Testun ac Tynnu yn ôl Swydd cyfleustodau, gall un eich helpu i ychwanegu'r un nifer o seroau blaenllaw i gelloedd, un yn eich helpu i gael gwared ar yr un nifer o linyn o'r chwith o'r celloedd.

Ar ôl gosod Kutools ar gyfer Excel, gwnewch fel isod:(Lawrlwythiad Am Ddim Kutools ar gyfer Excel Nawr!)

Ychwanegwch yr un nifer o seroau blaenllaw

1. Yn gyntaf, mae angen i chi fformatio'r celloedd fel Testun trwy eu dewis a chlicio Hafan a mynd i Rhifol grwp i ddewis Testun o'r gwymplen. Gweler y screenshot:
kutools doc 1

2. Ac yna cadwch y celloedd hyn wedi'u dewis, a chlicio Kutools > Testun > Ychwanegu Testun. Gweler y screenshot:
kutools doc 2

3. Yn y Ychwanegu Testun deialog, teipiwch y seroau rydych chi am eu hychwanegu i flwch testun Testun, a gwirio Cyn y cymeriad cyntaf opsiwn, a gallwch chi gael rhagolwg o'r canlyniad ychwanegu yn y cwarel iawn. Gweler y screenshot:
kutools doc 3

4. Cliciwch Ok or Gwneud cais, nawr mae'r un nifer o seroau blaenllaw yn cael eu hychwanegu at gelloedd.
kutools doc 4

Dileu'r un nifer o seroau blaenllaw

1. Dewiswch gelloedd rydych chi am ddileu'r seroau blaenllaw, a chlicio Kutools > Testun > Tynnu yn ôl Swydd. Gweler y screenshot:
kutools doc 5

2. Yn y dialog popping, teipiwch nifer y seroau rydych chi am eu tynnu, gwiriwch yr opsiwn, a gallwch chi gael rhagolwg o'r canlyniad yn y cwarel Rhagolwg.
kutools doc 6

3. Cliciwch Ok or Gwneud cais, nawr mae'r seroau blaenllaw yn cael eu tynnu ar unwaith.


Pori tabbed a golygu nifer o lyfrau gwaith Excel / dogfennau Word fel Firefox, Chrome, Internet Explore 10!

Efallai y byddwch yn gyfarwydd i weld tudalennau gwe lluosog yn Firefox/Chrome/IE, a newid rhyngddynt drwy glicio tabiau cyfatebol yn hawdd. Yma, mae Office Tab yn cefnogi prosesu tebyg, sy'n eich galluogi i bori trwy lyfrau gwaith Excel lluosog neu ddogfennau Word mewn un ffenestr Excel neu ffenestr Word, a newid yn hawdd rhyngddynt trwy glicio ar eu tabiau. Cliciwch am ddim 30- treial diwrnod o Office Tab!

ot rhagori

Erthyglau Perthynas:

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I want to keep the leading zero's when I copy from the program I use at work & paste onto excel with out having to manually re-enter them. I would also like to keep them when I use my scanner into excel. Using the 'Text' format I can manually re-enter them into the cell & they will stay. Is there a format so that they go in with the leading zero's already there?
This comment was minimized by the moderator on the site
Hi, McJoe, I do not understand your question clearly, if you want to copy text string with leading zeros from a program, maybe Word document, and paste them to a worksheet and keep the leading zeros, you just format the cells as text before you pasting.
This comment was minimized by the moderator on the site
I want to remove the zero infront of the - 3TT-0233449.How do I go about it?
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
Thanks it worked
This comment was minimized by the moderator on the site
This is the BEST Excel site for years going! IDK how they do so much volume. WorkRng.Value = WorkRng.Value =VALUE(A1) brilliant code.
This comment was minimized by the moderator on the site
value(a1) worked great, thank you soo much !
This comment was minimized by the moderator on the site
BRILLIANT WORK!!! Excellent
This comment was minimized by the moderator on the site
I wanted to display "0001" instead of "1" in excel as Excel removes leading zeroes. Solution: Use Format Cells/ Custom format/ Type = "0000" Done. Instead this page refers to "Kutools" THIRTEEN times. Who's writing this page? Obviously the author of Kutools or someone getting a kickback from it!
This comment was minimized by the moderator on the site
If you needed to use your newly formatted number to conduct an HVLookup it will not match other data that may have embedded leading zero's. The formatting method you are referring to displays the number the way you want to see it but it will not be useful in a data match or lookup while the VBA will work.
This comment was minimized by the moderator on the site
This comment is very helpful and is the correct approach for must users looking to perform this function retroactively on their data.


The Shill is also very real, lol.
This comment was minimized by the moderator on the site
You can also do

format cell > text format ( instead of Number or accounting or Currency or general )
This comment was minimized by the moderator on the site
But how to keep the leading zeroes when I download data directly from my website or from my warehouse program? The download is directly in excel, so I can not modify anything in advance. Is there any option in excel which determines in advance that the entire column or sheet must be read (downloaded) as text?
This comment was minimized by the moderator on the site
download file in.txt and open excel and desired column select and go to format cell and select as text, after this please open your .txt file and copy from .txt file and paste it in xl.... Done
This comment was minimized by the moderator on the site
Is there any way to do it from Excel tools ? In case we have n number of records this method is of no use.
This comment was minimized by the moderator on the site
using value(a1) worked great for deleting leading zeros
This comment was minimized by the moderator on the site
Nice try slick, your methods don't work. Didn't try VBA, surely there's an easier way than that.
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