Skip to content

Instantly share code, notes, and snippets.

@anhtuank7c
Created January 24, 2017 05:04
Show Gist options
  • Save anhtuank7c/cf0aa44aafc89595fe69ee94948e4378 to your computer and use it in GitHub Desktop.
Save anhtuank7c/cf0aa44aafc89595fe69ee94948e4378 to your computer and use it in GitHub Desktop.
Cách fix lỗi range names trong excel
Bước 1: Mở file excel bị lỗi duplicate named
Bước 2: Nhấn Alt + F11 và Insert > Module rồi paste code sau vào
Option Explicit
Sub RemNamedRanges()
Dim nm As Name
On Error Resume Next
For Each nm In ActiveWorkbook.Names
nm.Delete
Next
On Error Goto 0
End Sub
Bước 3: Nhấn F5 hoặc nút play để chạy code, rồi Ctrl + S để lưu lại
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment