Rename Sheets
Location on ribbon: Tab DVD Addin → Group View and Sheets → Menu Sheet Menu
Command ID: btnRenameSheets
What it does
Renames many sheets at once from a two-column mapping table: the left column holds the current sheet name, the right column the new one. The add-in walks the rows, finds the matching sheet and renames it.
Use it whenever a whole workbook needs consistent names: turning Sheet1, Sheet2… into work-package names, prefixing every tab with a contract code, or replacing accented Vietnamese names with short codes before issuing the file.
How to use
- On any sheet, build a table of two adjacent columns: column 1 = old sheet name, column 2 = new sheet name. No header row is needed.
- Go to tab DVD Addin → group View and Sheets → Sheet Menu → Rename Sheets.
- Excel's range picker asks for a 2-column range: 1) Old sheet name, 2) New sheet name.
- Drag-select the two data columns (for example
B4:C25) and click OK. If the range is not exactly two columns wide, the add-in reports an error and stops. - Every row is processed, blank pairs are skipped, and a summary appears: "Renamed: success=…, not found=…, errors=…".
Example
A mapping table on the DanhMuc sheet:
| Before (column B) | After (column C) |
|---|---|
Sheet1 | 01-TH-Khoiluong |
Sheet2 | 02-KL-Mongcoc |
Sheet3 | 03-KL-Dammong |
KL than | 04-KL-Than |
Select B2:C5, click OK, and the four tabs immediately take the names in column C — the tab bar now reads in the order required for submission.
Notes
- The selection must be exactly two columns; one or three columns is rejected with a message.
- Old names are matched case-insensitively and trimmed of leading/trailing spaces — a misspelled entry lands in the "not found" count.
- A new name Excel refuses (over 31 characters, containing
: \ / ? * [ ], or duplicating an existing sheet) is counted as an error and that sheet keeps its old name. - Hold ESC to stop partway; sheets already renamed keep their new names.
- The change cannot be undone with Ctrl+Z, and formulas in other workbooks that reference the old sheet names will break.
Related
- Sheet Numbering — add sequence prefixes without building a mapping table.
- UnDiacritics — strip Vietnamese accents from all sheet names.
- Sheet List — dump the current sheet names to use as the "old name" column.
- Rename Files — the same idea applied to file names in a folder.