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

Excelのセルの文字数を制限するにはどうすればよいですか?

Excel のセルには最大 32,767 文字を含めることができますが、表示されるのは 1,024 文字のみで、32,767 文字すべてが数式バーに表示されます。 ただし、10 文字に制限するなど、セル内のユーザー入力を特定の文字数に制限する必要がある場合があります。 このチュートリアルでは、Excel セルの文字数を効果的に制限する方法を説明します。


セル内の文字数を制限する

このセクションでは、特定のセルまたはセル範囲に入力できる文字数を制限する手順について説明します。

  1. 文字長制限を適用するセル範囲を選択します。
  2. データ検証 セクションに データツール グループの下に 且つ タブには何も表示されないことに注意してください。
  3. データ検証 ダイアログ ボックスで、次のように入力規則を設定してください。
    1. ノーザンダイバー社の 許可: ドロップダウンメニュー、選択 テキストの長さ.
    2. ノーザンダイバー社の 日付: ドロップダウンで、要件に基づいて基準を選択します。
      1. 選択する に等しい 正確な文字数 (例: 10 文字) のオプション。
      2. 選択 以下 最大文字数制限 (たとえば、最大 10 文字)。
      3. 選ぶ 越える 特定の数を超える場合 (たとえば、10 文字を超える場合)。
    3. 最大/最小/長さ: ボックスに、必要に応じて文字制限の数値を入力します。
  4. OK.

これで、ユーザーは選択したセルに設定された文字制限内のテキストを入力するように制限されます。

Excelのセル/選択範囲に特殊文字、数字、または文字を入力しないようにするのは簡単です

Excel用のKutoolsを使用 入力を防ぐ この機能を使用すると、Excel のセルまたは選択範囲の文字の種類を簡単に制限できます。
A。 次のような特殊文字の入力をブロックします。 *, !等。
B。 数字や特定の文字などの特定の文字の入力を制限します。
C。 必要に応じて、数字や文字などの指定された文字のみを入力できるようにします。

文字数制限を通知する入力メッセージを設定します

ここでは、以下のスクリーンショットに示すように、ユーザーが入力を開始する前に文字制限について通知する入力メッセージを設定する方法を説明します。

  1. 入力メッセージを追加するセルを選択します。
  2. データ検証 セクションに データツール グループの下に 且つ タブには何も表示されないことに注意してください。
  3. データ検証 ダイアログボックスで 入力メッセージ タブをクリックし、次のようにします。
    1. チェック セルが選択されたときに入力メッセージを表示する オプションを選択します。
    2. メッセージのタイトルとメッセージの内容を入力します。
  4. OK.

ここで、入力メッセージが構成されているセルをクリックすると、ツールチップが表示され、前に入力したメッセージのタイトルと内容が表示されます。


文字数制限違反に対するエラー アラートを有効にする

このセクションでは、入力されたデータが指定された文字数制限を満たしていない場合にユーザーに即座に通知するように設計された Excel でのエラー アラートの構成方法について説明します。 スクリーンショットを参照してください:

  1. 無効なデータ入力のインスタンスに対してエラー アラートをアクティブにするセルを選択します。
  2. データ検証 セクションに データツール グループの下に 且つ タブには何も表示されないことに注意してください。
  3. データ検証 ダイアログボックスで エラーアラート タブをクリックし、次のようにします。
    1. チェック 入力した無効なデータの後にエラーアラートを表示する オプションを選択します。
    2. 現在地に最も近い 警告 オプションから スタイル: ドロップダウンボックス。
    3. アラートのタイトルとエラー メッセージを入力します。
  4. OK.

今後、セルに入力した文字列が 10 文字を超えるなど無効な場合、警告ダイアログ ボックスが表示され、あらかじめ設定されているアラート タイトルとメッセージが表示されます。


デモ: 入力メッセージとアラート警告を含むセルの文字長を制限する


Kutools for Excel: 300 を超える便利なツールをすぐに利用できます。 機能制限なしの 30 日間の無料トライアルを今すぐ始めてください。 今すぐダウンロード!

ワンクリックで、単一の列/リストに重複データが入力されないようにします

Kutools for Excelの革新的な 重複を防ぐ このユーティリティは、Excel ユーザーに、リストまたは列内の重複エントリを簡単に防止できる利便性を提供します。 この強力なツールは、ワンクリックするだけで、スプレッドシートのデータの整合性と正確性を保証します。

関連記事:

Excelでセル値のエントリを制限するにはどうすればよいですか?

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

🤖 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 (54)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
why date and number is allowed at text length?
This comment was minimized by the moderator on the site
Hi there, numbers are also characters. So if you set the max length less than 10 characters, as long as you don't input 10 or more number characters, you will be good.

Amanda
This comment was minimized by the moderator on the site
This is almost the exact solution I need but still need a bit more help. What I'm trying to achieve is to set a cell to have a max of 40 characters but not stop the user from entering all the data he needs, instead i would like anything over the 40 character limit to be populated in a second designated cell. Is this even a possibility? Thank you everyone in advance for any assistance provided.
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
I saw Tomas question about putting an exact limit of 10 spaces and your formula =A1&REPT(" ",10-LEN(A1)) however I need to take it a step further. I want to take three separate fields that I have set their spaces to exactly 10 and concatenate them with their "spaces" intact. Also, if I don't limit what they enter and they enter MORE than 10 characters in one of the cells I want to take ONLY the first 10. So as an example, I want to give them three cells they can enter information in. I don't want to limit what they input BUT, I want to concatenate these three fields and pick up 10 characters from each one. So if the first cell has 4 characters, in my concatenate formula I want it to pick up the 4 characters PLUS 6 spaces. If the second field has 20 characters, I want to only pick up the first 10 characters and the same thing for the third cell. We are trying to get to a uniform 30 characters of description but some names are longer or shorter than others. We want this to break evenly with 10 characters per cell. Hopefully this is making sense.
This comment was minimized by the moderator on the site
Hi, do you know how to put exact length limit 10 and when put abc i want from excel to put 8 space?
I want to set a cell to 10 character, when input 2 character then will auto fill up with 8 space after. if the cell is blank, then return with 10 space. this is for setting a excel file for user input and save as txt or cvs file for import to other software.
This comment was minimized by the moderator on the site
Hi Tomas,
You can use a formula to limit the text length: =A1 & REPT(" ",10-LEN(A1))
This comment was minimized by the moderator on the site
I want to limit the quantity of a cell depending on the category of another one,

For example if I input in A1 "Ok" in B1 must be limit to 10 characters
but if A1= "NG", B1 must be limit to 12 characters.
This comment was minimized by the moderator on the site
[quote]Hi, do you know how to put exact length limit 10 and when put abc i want from excel to put 8 space?By Ivan[/quote] I want to set a cell to 10 character, when input 2 character then will auto fill up with 8 space after. if the cell is blank, then return with 10 space. this is for setting a excel file for user input and save as txt or cvs file for import to other software
This comment was minimized by the moderator on the site
Hi, I have a attendance sheet. from 1 to 31. I put "P" on each cell if person is present. Now I want that how many times "P" is continuing present in cell. As as example - I have put "P" from 1 to 6 , then from 8th to 9th put P, and 10th is gap. then from 11th its continue to 18th. ... now i want how many times P is continue 6 time . PPPPPP PP PPPPPPPP Manually the answer is : 2(1to6 = 1,11to18=1) If you have any formula to count this it will be a great help.
This comment was minimized by the moderator on the site
=COUNTIF(B2:B17,">""") this formula will ignore empty cells but will count cells with data in i.e. P
This comment was minimized by the moderator on the site
Hi. I want out put txt file and no spaces between cell values. Like 3 cells with First Name, Middle and last. Entered Shawn G Goldman as SHAWNGGOLDMAN
This comment was minimized by the moderator on the site
Hi I want few things in a cell. I only want numbers in cell. I want to limit to 10 characters. I want to remove decimal like 15.00 to 1500. I want to indent to right. Also to add 0's to left to make it 10 characters .like 15.00 to 0000001500
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