Skip to main content

Conas formáidiú cille a chosaint ach iontráil sonraí in Excel a cheadú?

In a lán cásanna, b’fhéidir go mbeidh ort formáidiú raon cealla a chosaint agus gan ach sonraí a iontráil in Excel. Soláthraíonn an t-alt seo trí mhodh chun é a bhaint amach.

Formáidiú cille a chosaint ach iontráil sonraí a cheadú ach an bhileog oibre a chosaint
Formáidiú cille a chosaint ach gan ach iontráil sonraí le cód VBA a cheadú
Formáidiú cille a chosaint ach gan ach sonraí a iontráil le Kutools le haghaidh Excel


Formáidiú cille a chosaint ach iontráil sonraí a cheadú ach an bhileog oibre a chosaint

Chun formáidiú cille a chosaint ach iontráil sonraí a cheadú, ní mór duit na cealla seo a dhíghlasáil ar dtús, agus ansin an bhileog oibre a chosaint. Déan mar a leanas le do thoil.

1. Roghnaigh na cealla a theastaíonn uait chun a bhformáidiú a chosaint ach gan ach sonraí a iontráil, ansin brúigh Ctrl + 1 eochracha ag an am céanna chun an Cealla Formáid dialóg.

2. Sa Cealla Formáid bosca dialóige, díthiceáil an Faoi Ghlas bosca faoin Cosaint tab, agus ansin cliceáil ar an OK cnaipe. Féach an pictiúr:

3. Anois téigh chun cliceáil Athbhreithniú > Bileog Cosanta.

4. Sonraigh agus comhlíon do phasfhocal sa Bileog Cosanta agus Deimhnigh do Phasfhocal boscaí dialóige. Féach an pictiúr:

Anois tá an bhileog oibre cosanta, agus ní athraítear formáidiú na gceall. Ach ní cheadaítear ach iontráil sonraí sna cealla sonraithe.


Formáidiú cille a chosaint ach gan ach iontráil sonraí le cód VBA a cheadú

Is féidir leat an script VBA seo a leanas a reáchtáil freisin chun formáidiú cille a chosaint ach iontráil sonraí in Excel a cheadú. Déan mar a leanas le do thoil.

1. Brúigh Eile + F11 eochracha ag an am céanna chun an Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. Sa Microsoft Visual Basic d’Fheidhmchláir fuinneog, cliceáil dúbailte An Leabhar Oibre seo ar phána an Tionscadail, agus ansin cóipeáil agus greamaigh an cód VBA thíos sa An Leabhar Oibre seo (Cód) fhuinneog.

Cód VBA: Cosain formáidiú cille ach lig iontráil sonraí amháin

Sub AllowDataEntryOnly()
    ActiveSheet.Protect Userinterfaceonly:=True, AllowFiltering:=True
    Range("C2:C20").Locked = False
        MsgBox "Only allow data entry in range C2:C20", vbInformation, "Kutools for Excel"
End Sub

nótaí: Sa chód, is é C2: C20 an raon ina gceadaíonn na cealla nach ndéanann tú ach sonraí a iontráil. Athraigh an raon bunaithe ar do chuid riachtanas le do thoil.

3. Brúigh an F5 eochair chun an cód a rith. I mbosca dialóige Kutools for Excel, cliceáil an OK cnaipe.

Anois tá an bhileog oibre cosanta chomh maith le formáidiú na gceall. Agus ní cheadaítear ach sonraí a iontráil sna cealla sonraithe.


Formáidiú cille a chosaint ach gan ach sonraí a iontráil le Kutools le haghaidh Excel

Is féidir leat cealla roghnaithe a dhíghlasáil go héasca agus an bhileog oibre a chosaint le fóntais Dearadh Bileog Oibre Kutools le haghaidh Excel.

Roimh iarratas a dhéanamh Kutools le haghaidh Excel, Le do thoil é a íoslódáil agus a shuiteáil ar dtús.

1. cliceáil Kutools Plus > Dearadh Bileog Oibre a ghníomhachtú an dearadh Tab.

2. Roghnaigh na cealla a theastaíonn uait chun a bhformáidiú a chosaint ach gan ach sonraí a iontráil, cliceáil Díghlasáil Cealla faoi ​​na dearadh tab, agus ansin cliceáil ar an OK cnaipe sa popping suas Kutools le haghaidh Excel bosca dialóige. Féach an pictiúr:

3. Cliceáil ar an Bileog Cosanta cnaipe faoi dearadh Tab.

4. Agus ansin sonraigh agus comhlíon do phasfhocal sa Bileog Cosanta agus Deimhnigh do Phasfhocal boscaí dialóige. Féach an pictiúr:

Anois tá an bhileog oibre cosanta. Agus ní cheadaítear ach iontráil sonraí sna cealla sonraithe.

  Más mian leat triail saor in aisce (30 lá) a bheith agat ar an bhfóntas seo, cliceáil le do thoil chun é a íoslódáil, agus ansin téigh chun an oibríocht a chur i bhfeidhm de réir na gcéimeanna thuas.


Airteagal gaolmhar:

Uirlisí Táirgiúlachta Oifige is Fearr

🤖 Kutools AI Aide: anailís sonraí a réabhlóidiú bunaithe ar: Forghníomhú Chliste   |  Gin Cód  |  Cruthaigh Foirmlí Saincheaptha  |  Anailís a dhéanamh ar Sonraí agus Cairteacha a Ghin  |  Feidhmeanna Kutools a agairt...
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 le haghaidh Excel, agus Éifeachtúlacht Taithí Cosúil Ná Roimhe. Kutools le haghaidh Excel Tairiscintí Níos mó ná 300 Ardghnéithe chun Táirgiúlacht a Treisiú agus Sábháil Am.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

Tuairisc


Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair 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 (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Cette manœuvre ne fonctionne pas. Les formules ne sont toujours pas sécurisées
This comment was minimized by the moderator on the site
Tried that and save, after I close file, it asks for password. Which of course there is none and I am now locked out of my workbook. Pls adv
This comment was minimized by the moderator on the site
Hi Pamela,
If you apply the VBA code mentioned in the post. The worksheet is protected, but there is no password. Please click Review > Unprotect Worksheet to unprotect the worksheet without entering a password.
This comment was minimized by the moderator on the site
I read the "Protect cell formatting but only allow data entry by protecting worksheet" is wrong. The format can still be changed. I thought you had found something there. You did not...
This comment was minimized by the moderator on the site
Yeah.. this does not work at all. It does not prevent the cells from being formatted. Bad site!
This comment was minimized by the moderator on the site
Hi, Thank you for the code, it was very useful. I was wondering if you could put in a part where the supervisor could enter a code so that they could edit the formatting and then locking it again without having to delete the code every time this is needed.
This comment was minimized by the moderator on the site
I followed the directions, but was not able to enter data into the locked cells as mentioned in the instructions. Anyone have a solution?
This comment was minimized by the moderator on the site
Hi kristen,
For a protected worksheet, you can only enter data into the unlocked cells.
This comment was minimized by the moderator on the site
It still allows for users to delete the formulas...
This comment was minimized by the moderator on the site
It is any way that you can lock the cells for the formulas and allow input data only? With regular excel not having enterprise
This comment was minimized by the moderator on the site
The "Protecting Worksheet" instructions do not lock the formatting. If you copy cells in normally the formatting is copied over with them.
This comment was minimized by the moderator on the site
Please let us know if found a solution for this specific case.
This comment was minimized by the moderator on the site
The solution is here, however it is very medicore because You may forget about ctrl + z :P Useless if You want to preapare worksheet for others but usefull for own purposes if set as "ctrl + shift + v"

https://www.extendoffice.com/documents/excel/2545-excel-set-paste-values-as-default.html
This comment was minimized by the moderator on the site
agreed.... did you find any other solution to this anywhere?
This comment was minimized by the moderator on the site
Came here looking for a solution to this same problem which Matt mentioned.
If you paste a cell from another sheet to the protected cell, unfortunately cell formatting is overwritten!
Any solution to this issue so far?
This comment was minimized by the moderator on the site
I am having the same. The whole reason I want to protect the formatting is to stop the copy & paste issue! I hope someone has a solution.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations