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

Excelですべての名前付き範囲をすばやく削除するにはどうすればよいですか?

ブックに多くの名前付き範囲を作成したと仮定しますが、これらの名前付き範囲はもう必要ありません。Excelですべての名前付き範囲を一度に削除するにはどうすればよいでしょうか。


名前マネージャーに移動して、すべての名前付き範囲を削除します

[名前マネージャー]ダイアログボックスでは、名前付き範囲を必要に応じて作成、編集、および削除できます。 このようにしてください:

1。 行く 名前管理者 クリックして > 名前管理者、スクリーンショットを参照してください:
doc-delete-named-ranges1

2。 の中に 名前管理者 ダイアログ、を押します シフト キーを押してすべての名前付き範囲を選択するか、 Ctrlキー キーを押して不要なものを選択します。スクリーンショットを参照してください。
doc-delete-named-ranges1

3。 そして、 削除 ダイアログの上部にあるボタンをクリックすると、名前を削除するかどうかを通知するプロンプトボックスが表示されます。
doc-delete-named-ranges1

4。 次に、をクリックします OK、すべての名前付き範囲が一度に削除されました。

doc-delete-named-ranges4 -2 doc-delete-named-ranges5

すべての名前付き範囲を検索して、数式内の対応するセル参照に置き換えます

Excel用のKutools 範囲名を置き換える ユーティリティは、選択した範囲、指定したシート、またはすべてのシートの名前付き範囲を適用するすべての数式を簡単に見つけることができます。 そして、このユーティリティの主な役割は、すべての名前付き範囲をこれらの数式の対応するセル参照に置き換えることです。


名前付き範囲1の広告置換

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

VBAコードですべての名前付き範囲を削除する

次の短いVBAコードは、ブック内のすべての名前付き範囲を削除するのにも役立ちます。

1。 を押し続けます Alt + F11 キー、そしてそれは開きます Microsoft Visual Basic forApplicationsウィンドウ.

2に設定します。 OK をクリックします。 インセット > モジュール、次のコードをに貼り付けます モジュールウィンドウ.

VBAコード:Excelで名前付き範囲をすべて削除します

Sub DeleteNames()
'Update 20140314
Dim xName As Name
For Each xName In Application.ActiveWorkbook.Names
    xName.Delete
Next
End Sub

3。 次に、 F5 このコードを実行するためのキーを押すと、ブック内のすべての名前がす​​ぐに削除されます。


関連記事:

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

🤖 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)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
first if the excel extension is xls then convert it using excel to xlsx .then close excel. make a backup of your xlsx file. rename this backup extension to zip. under zip file there is a xl folder.under the xl folder there is a workbook.xml file. open it with xml notepad and delete defined names. or open it with notepad delete between <definednames> to </definednames>. and also delete this definednames parts too.then save this workbook.xml and drag drop inside zip files xl folder . then save it. and change the extension to xlsx file. open the file and press Ctrl+S. All defined names cleared with hidden ones.
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
You should check if it is an internal protected name range like so
```
Sub DeleteNames()
Dim xName As Name
For Each xName In Application.ActiveWorkbook.Names
If Split(xName.Name, ".")(0) <> "_xlfn" Then
xName.Delete
End If
Next
End Sub
```
This comment was minimized by the moderator on the site
This was an improved code from the prior. I had many names for which the delete button was dimmed out, wouldn't work, nor would the prior code. Yours removed all but one. Thank you!!
This comment was minimized by the moderator on the site

Sub DeleteNames()
    Dim xName As Name
    For Each xName In Application.ActiveWorkbook.Names
        If Split(xName.Name, ".")(0) <> "_xlfn" Then
            xName.Delete
        End If
    Next
End Sub
This comment was minimized by the moderator on the site
Run Time Error 7
out of memory
This comment was minimized by the moderator on the site
Hello, Murali
I have tested the code, it works well in my workbook.
Could you upload your workbook here, so that we can check where the problem is?

Thank you!
This comment was minimized by the moderator on the site
How about something a little more specific.

First Identify all unused named ranges, for review.

Second, macro to delete all unused named ranges.
This comment was minimized by the moderator on the site
When I try to run the above VBA Code, I get the following error:

Run-time error '1004'
The syntax of this name isn't correct.

Verify that the name:
- Starts with a letter or underscore
- Doesn't include a space or character that isn't allowed
- Doesn't conflict with an existing name in the workbook
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations