メインコンテンツへスキップ

セルの書式設定を保護し、Excelでのデータ入力のみを許可するにはどうすればよいですか?

多くの場合、セル範囲の書式設定を保護し、Excelでのデータ入力のみを許可する必要があります。 この記事では、それを実現するためのXNUMXつの方法を紹介します。

セルのフォーマットを保護しますが、ワークシートを保護することによってのみデータ入力を許可します
セルの書式設定を保護しますが、VBAコードでのデータ入力のみを許可します
セルの書式設定を保護しますが、Kutools forExcelでのデータ入力のみを許可します


セルのフォーマットを保護しますが、ワークシートを保護することによってのみデータ入力を許可します

セルの書式設定を保護し、データ入力のみを許可するには、最初にこれらのセルのロックを解除してから、ワークシートを保護する必要があります。 次のようにしてください。

1.フォーマットを保護するために必要なセルを選択しますが、データ入力のみを許可し、を押します Ctrlキー + 1 キーを同時に開いて セルの書式設定 ダイアログボックス。

2。 の中に セルの書式設定 ダイアログボックスで、チェックを外します ロック 下のボックス 保護 タブをクリックして、 OK ボタン。 スクリーンショットを参照してください:

3.次にクリックします レビュー > 保護シート.

4.パスワードを指定して適合させてください 保護シート & パスワードの確認 ダイアログボックス。 スクリーンショットを参照してください:

これでワークシートが保護され、セルの書式は変更されません。 ただし、指定されたセルはデータ入力のみが許可されます。


セルの書式設定を保護しますが、VBAコードでのデータ入力のみを許可します

次のVBAスクリプトを実行してセルの書式設定を保護することもできますが、Excelでのデータ入力のみを許可します。 次のようにしてください。

1。 押す 他の + F11 同時にキーを開いて アプリケーション向け Microsoft Visual Basic 窓。

2。 の中に アプリケーション向け Microsoft Visual Basic ウィンドウ、ダブルクリック このワークブック [プロジェクト]ペインで、以下のVBAコードをコピーして ThisWorkbook(コード) 窓。

VBAコード:セルの書式設定を保護しますが、データ入力のみを許可します

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

Note:コードでは、C2:C20は、データ入力を許可するセルの範囲です。 必要に応じて範囲を変更してください。

3。 プレス F5 コードを実行するためのキー。 ポップアップ表示されるKutoolsfor Excelダイアログボックスで、[OK]ボタンをクリックします。

これで、ワークシートとセルの書式が保護されます。 また、指定されたセルのみがデータ入力を許可されます。


セルの書式設定を保護しますが、Kutools forExcelでのデータ入力のみを許可します

Kutools for Excelのワークシートデザインユーティリティを使用すると、選択したセルのロックを簡単に解除してワークシートを保護できます。

申請する前に Kutools for Excelについては 最初にダウンロードしてインストールします.

1。 クリック クツールズプラス > ワークシートのデザイン を活性化する 設計 タブには何も表示されないことに注意してください。

2.フォーマットを保護するために必要なセルを選択しますが、データ入力のみを許可します。 セルのロックを解除する設計 タブをクリックして、 OK ポップアップのボタン Kutools for Excel ダイアログボックス。 スクリーンショットを参照してください:

3。 クリック 保護シート ボタンの下に 設計 タブには何も表示されないことに注意してください。

4.次に、パスワードを指定して適合させます。 保護シート & パスワードの確認 ダイアログボックス。 スクリーンショットを参照してください:

これでワークシートが保護されました。 また、指定されたセルはデータ入力のみが許可されます。

  このユーティリティの無料トライアル(30日)が必要な場合は、 クリックしてダウンロードしてください、次に、上記の手順に従って操作を適用します。


関連記事:

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
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