Skip to content

Subscript ​

Location on ribbon: Tab DVD Addin → Group Text and Number → Menu Text ops

Command ID: btnSubscript

What it does ​

The command formats chemical formulas in the selection: the digits in a formula are lowered to subscript (H2O becomes H₂O, Ca(OH)2 becomes Ca(OH)₂), while a charge sign + or - at the end of a formula and its digits are raised to superscript (Mg2+ becomes Mg²⁺). Only character formatting changes; the text in the cell is not rewritten.

On a construction project this serves concrete admixture tables, water test results and cement composition sheets — anywhere chemical notation has to be presented correctly.

How to use ​

  1. Select the cells containing chemical formulas — cells where formulas appear inside prose are fine too; the wording is kept.
  2. Go to tab DVD Addin → group Text and Number → menu Text ops → Subscript.
  3. The command finds the chemical formulas in each cell and changes only the formatting of their digits and charge signs; the rest of the cell is not touched.
  4. The status bar reports how many cells were processed.

Video tutorial ​

Narrated in Vietnamese, with Vietnamese subtitles. Chỉ số trên và chỉ số dưới · 5 min 33 s · 9 cases · Download the video · Practice workbook for the video

Commands in this video: Superscript · Subscript

Chapters (13)
  1. Giới thiệu
  2. Mở lệnh
  3. 1 · Cột đơn vị m2, m3
  4. 2 · Đơn vị nằm trong câu chữ
  5. 3 · Chọn cả bảng
  6. 4 · Công thức hoá học trong câu
  7. 5 · Phương trình phản ứng
  8. 6 · Ion có điện tích
  9. 7 · Mác vật liệu không bị nhầm
  10. 8 · Khi không có gì để đổi
  11. 9 · Hoàn tác
  12. Mẹo
  13. Kết thúc

Illustrated walkthrough ​

Practice

Download this command's sample workbook — the data matches the pictures below (sheet Water tests), so you can follow each step right away.

Step 1. Select the cells holding chemical formulas, for example a list of mixing-water components and test items (1) — cells where formulas sit inside a sentence are fine too.

Step 1

Step 2. On the ribbon, open the DVD Addin tab → Text and Number group → open Text ops → choose Subscript.

DVD Addin ▸ Text and Number ▸ Text ops ▸ Subscript

Step 3. The add-in counts the cells that contain chemical formulas and asks again. Keep the sheet backup ticked (1), then click Continue (2).

Step 3

Step 4. Digits inside the formulas drop to subscript and the charge 3+ rises to superscript; the surrounding words and grades B25, M300 are untouched (1). Only character formatting changes — the cell value is still Water H2O (2). The status bar reports how many cells were processed (3).

Step 4

Example ​

An admixture composition table and the mixing-water test results.

BeforeAfter
H2OH₂O
Ca(OH)2Ca(OH)₂
CO2CO₂
Fe3+ ions in mixing waterFe³⁺ ions in mixing water
Concrete B25, mortar M300Concrete B25, mortar M300 (unchanged)

Notes ​

  • The command does not rewrite the cell text: no spaces are removed or inserted, only character formatting changes. Cells containing prose keep their wording.
  • A word counts as a chemical formula only when it breaks down entirely into element symbols (H, O, Ca, Fe…), brackets and digits; contains at least two element symbols or a charge sign; and every count is a single digit. So H2O and CO2 are formatted, while concrete and mortar grades such as B25, M300 or C30 are left alone.
  • Digits are lowered using the font subscript attribute, not the Unicode character ₂; copying to another application can lose the formatting.
  • Excel formula cells cannot take per-character formatting and are skipped.
  • Ctrl+Z right after the command puts the sheet back as it was (thanks to the backup); still, test on a few cells first.

Released under DVDAddin License.