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

Excelで文字列から最初/最後のn文字を抽出するにはどうすればよいですか?

たとえば、各セルに長い文字列を含むリストがあり、各文字列の最初の3文字のように、各文字列から最初のn文字のみを抽出したい場合、次の方法を使用してExcelで解決できます。 。

式を使用して文字列から最初/最後のn文字を抽出します

Kutools forExcelを使用して文字列から最初/最後のn文字を抽出します

Excelのセルから特殊文字(数値/アルファ)を​​すばやく削除します

数回クリックするだけで 文字を削除する の効用 Kutools for Excel、特殊文字はセルから一度に削除されます。
30 日間の無料トライアルをクリックしてください!
docは文字を削除します
Kutools for Excel:300を超える便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます。

矢印青い右バブル 式を使用して文字列から最初/最後のn文字を抽出します

文字列から最初のn文字を抽出します

空白のセルを選択します。ここではセルG1を選択し、この数式を入力します = LEFT(E1,3) (E1は最初の3文字を抽出するセルです)、を押します 入力します ボタンをクリックし、塗りつぶしハンドルを目的の範囲までドラッグします。 次に、最初の3文字が抽出されているのがわかります。

最後の3文字のように、最後のn文字を抽出する場合は、次の式を入力します = RIGHT(E1、3).


矢印青い右バブル Kutools forExcelを使用して文字列から最初/最後のn文字を抽出します

  位置で削除 の特徴 Kutools for Excel また、Excelの文字列からのみ最初または最後のn文字を抽出できます。

Kutools for Excel 300以上の便利なExcelツールが含まれています。 30日以内に制限なしで無料でお試しいただけます。 今すぐ入手

1.最初に最初の3文字を抽出する範囲を選択し、をクリックします クツール > テキストツール > 位置で削除。 スクリーンショットを参照してください:

2。 の中に 位置で削除 ダイアログで、文字列から削除する文字数をに入力する必要があります 数字 この場合のように、テキストボックスは最初の3文字を予約したいので、右から8文字を削除してから、チェックする必要があります。 右から。 スクリーンショットを見る

3。 クリック Ok、最初の3文字のみが予約されていることがわかります。

先端:最後の3文字を抽出する場合は、左からチェックして、文字列から削除する文字数を指定します。

注:

1.この機能を適用すると、元のデータが変更されます。最初にそれらをコピーすることをお勧めします。

2.この機能を使用できるのは、各セルのすべての文字列だけです。

位置による削除の詳細については、ここをクリックしてください。


関連記事:

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

🤖 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 (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
A1

UAN 101371765394, want only this Specific number 101371765394

Then =MID(A1,4,LEN(A1))
This comment was minimized by the moderator on the site
Line No: 2 AADHAAR XXXX XXXX 7842 is already mapped with UAN 101371765394,101371765394


This is paragraph i want only this number 101371765394.How i can get only number what is the formula for this. Kindly help us
This comment was minimized by the moderator on the site
So I want to build a formula to make a unique id number with a persons first three letters of last name and first 2 letters of first name and zeros to fill in the rest in total 8 characters? Did I ask correctly?
This comment was minimized by the moderator on the site
Hi, Cynthia Ferrera, no one formula can finish that job, but you can use multiple formulas to handle it, if you are interested in the solution, you can view the screen. If you do not want to use such many formulas, you can try Kutools for Excel' Split Names function and Extract Text function to finish the task.
This comment was minimized by the moderator on the site
i'm trying to set up a formula in my current worksheet. i want to remove everything after the first 5 numbers. I cant use kutools app at work. I dont know how to add the formula in to my current one. Any thoughts? the 53090 is what i would want and that is located in cell Q. This is a break down of 75 different numbers for different groups. I have each set of numbers assigned to a different grouping. As of right now i manually have to keep removing the extra numbers from each cell.

=SUM(COUNTIFS($O$12:$O$193,"530",$Q$12:$Q$193,{"53090","53095"}))
This comment was minimized by the moderator on the site
just use left

=left() click on the text you want to use, then the number of characters 5
This comment was minimized by the moderator on the site
hi, The Left/Right function works but it prints number as text. I mean when I try to apply the formula to extracted digits it do not give any output. I hope u understand what I am Trying to say
This comment was minimized by the moderator on the site
I love Kutools explanation needs to say this Kutools works only if the cells have the same number of characters. It won't work if the cells have different number of characters. For example, say I want to extract the first character of these FDIC board members ie, M, L and B. Kutools won't do it. But "=LEFT(E1,3)" in the first technique will work.
Martin J. Gruenberg
Lorraine Dennison
Barbara Ryan
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations