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

Excelでアクセント付き文字を通常の文字に置き換えるにはどうすればよいですか?

Microsoft Excelでアクセント付き文字を含むレポートをいくつか受け取りましたか? ブック全体を調べて、アクセント付きの文字を手動で通常の文字に置き換えるのは面倒に見えます。û"から" u "。そしてこの記事では、Excelでアクセント付き文字を通常の文字にすばやく置き換えるためのトリッキーなことをいくつか紹介します。


アクセント付き文字をVBAの通常の文字に置き換えます

Microsoft Excelの経験があるユーザーにとって、VBAマクロを使用することは、この複雑な作業に対処する簡単な方法です。

1. 押したまま 他の + F11 Excelでキーを押すと、 Microsoft Visual Basic forApplicationsウィンドウ.

2. インセット > モジュール、次のマクロをに貼り付けます モジュールウィンドウ.

Function StripAccent(thestring As String)
Dim A As String * 1
Dim B As String * 1
Dim i As Integer
Const AccChars= "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
Const RegChars= "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
For i = 1 To Len(AccChars)
A = Mid(AccChars, i, 1)
B = Mid(RegChars, i, 1)
thestring = Replace(thestring, A, B)
Next
StripAccent = thestring
End Function

3. 次に、空白のセルに移動して、数式をセルに貼り付けます。 = CheckStringCHAR(InString)例えば、 = CheckStringCHAR( "ù")または = CheckStringCHAR(A2).

注意:
(1)Microsoft Visual Basicは、Unicodeをサポートしていない場合、アクセント付き文字をまったく認識しない場合があります。 たとえば、Visual Basicで「š」を貼り付けると、「?」が表示される場合があります。 その場合、このマクロは使用できません。
(2)選択したセルの文字列のアクセント付き文字を直接置き換えることはありません。


アクセント付き文字を通常の文字に置き換えるKutoolsfor Excel

VBAマクロを使用するには、スキルと知識が多すぎます。 そして、次の方法は、数回クリックするだけで簡単に作業できるようになります。 Kutools for Excelのアクセント付き文字の置換ツールを使用すると、あらゆる種類のアクセント付き文字を通常の文字に一度に簡単に置き換えることができます。

Kutools for Excel - 300 以上の必須ツールで Excel を強化します。 クレジット カードは必要なく、全機能を備えた 30 日間の無料トライアルをお楽しみください。 今すぐ入手

1. すべてのアクセント付き文字を置き換える範囲を選択します。

2. クツール > テキスト > アクセント付き文字を置き換える…、スクリーンショットを参照してください:

3. In アクセント付き文字を置き換える ダイアログボックスで すべてを選択 ボタンをクリックしてすべての置換ルールを選択し、[OK]ボタンをクリックしてすべてのアクセント付き文字を置換します。 スクリーンショットを参照してください:

ノート:
(1)必要な特定のアクセント付き文字がない場合は、 ルールを追加する ボタンをクリックして、上記の[アクセント付き文字の置換]ダイアログのリストボックスに独自のルールを追加します。
(2)[アクセント付き文字の置換]ダイアログボックスで、新しい置換ルールをカスタマイズできます。

これで、選択した範囲の文字列内のすべてのアクセント付き文字がすぐに通常の文字に変換されます。 スクリーンショットを参照してください:

  アクセント付き文字を置き換える Kutools for 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 (12)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How can I replace multiple characters with a single one? For example é with e?
This comment was minimized by the moderator on the site
Dobrý deň, starší súbor xlsm mi vo win11 debuguje na tom, že nevie nájsť meno hárka "Prehľad", má problém s diakritikou.
Nie je problém zmeniť pomenovanie hárka na nové bez diakritiky resp. vyhľadať objekt inak, oveľa väčší problém je však zároveň ten,
že z tohto súboru v exceli pomocou VBA odosielam emaily a ak chcem pomocou VBA napísať telo emailu, tak sa mi v outlooku
menia písmená s diakritikou (č, ď, ť ...) na rôzne zástupné znaky. Email vyzerá nedôstojne a nechcem ho písať ani bez diakritiky,
pretože sme predsa na Slovensku a komunikujeme ešte v materinskej reči...
Môžete mi prosím napísať, či sa tento problém dá odstrániť konkrétnym nastavením windows alebo officu?
V predošlom počítači to fungovalo bez problémov.
Ďakujem pekne.
This comment was minimized by the moderator on the site
I tried that VBA script on my worksheet which had several names with accent characters. This did a nice job of cleaning them up. Thanks.
This comment was minimized by the moderator on the site
I have added the code and it work perfectly however I need to add more accent to the code as I´m missing polish accents. How can I edit the code and add those accents? I try to do it in a notepad and then paste again the code but it change the letter back to normal characters. I'm not an expert so I really need your help please!
This comment was minimized by the moderator on the site
Const AccChars = "ŠŽšžYAÁÂAÄAÇEÉEËIÍÎI?NOóÔOÖUÚUÜÝaáâaäaçeéeëiíîi?noóôoöuúuüýyĄĘĆŁŃóŚŻŹąęćłńóśżź"
Const RegChars = "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyyAECLNOSZZaeclnoszz"
This comment was minimized by the moderator on the site
The VBA function StripAccent() worked like a charm, thank you very much for it. But I would like to ask what exactly does this "* 1" at at the end of "Dim A As String * 1" initialization string, I've never seen that before and I wasn't able to find an answer to that myself so far.
This comment was minimized by the moderator on the site
when you remove special character it also remove the space between the text ??
This comment was minimized by the moderator on the site
is it possible to replace multiple characters with another character? There is no way to say I want to replace é by é

How can I do mass replacements like this in Kutools for Excel? I like the multireplace functionality but it would be a lot more useful if replacement of entire words would be possible. Anyboy any idea how I can do this?
This comment was minimized by the moderator on the site
If you are looking to replace a specific accent character (ex. é), you can do a Find and Replace All (search for "é" and replace with "e"). This solved my problem.
This comment was minimized by the moderator on the site
No shit Sherlock
This comment was minimized by the moderator on the site
Hello, Excellent Macro. Thanks for posting this. However I am wondering if I want to replace all of the characters in the excel file, how can I do that at once? Thanks Vivek
This comment was minimized by the moderator on the site
On the "Replace accented characters with regular characters with VBA" part, step 3, you must replace CheckStringCHAR for STRIPACCENT, which is the name of the function in the provided code!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations