How to Put Units Like kg, hrs, or Days Inside Google Sheets Numbers Without Breaking SUM Formulas

Typing weights, project hours, or stock counts like 15 kg, 8.5 hrs, or 12 boxes straight into a Google Sheets column looks tidy for humans—until your total at the bottom stays stubbornly stuck at 0 (or flashes a #VALUE! error). As soon as any letter sits inside a cell beside digits, Google Sheets treats the whole box as ordinary text rather than a number it can add up.

Instead of crowding your sheet with extra label columns, one tiny Custom Number Format prints words like kg or hrs right inside each cell while leaving the raw number underneath ready for SUM and AVERAGE formulas.

Why Custom Unit Formatting Keeps Every Formula Working

Custom number formatting changes only how the cell looks on screen, not what is actually typed inside. When you type plain 15 and apply the format rule 0" kg", Google Sheets draws 15 kg cleanly in the cell while remembering the pure value 15 underneath—meaning formulas, charts, sorting, and totals continue calculating cleanly without errors.

Add Unit Text Automatically Using Custom Number Formats in Google Sheets

Setting up custom unit suffixes works in Chrome, Safari, Edge, or Firefox on any computer.

  1. Highlight all the number cells (or the entire empty column where you plan to type weights, hours, or item counts) in Google Sheets.
  2. Confirm that any cells already typed contain only plain numbers (for instance, 15 rather than 15 kg).
  3. In the top menu bar, click Format, hover over Number, and pick Custom number format at the very bottom.
  4. Click inside the top input box and type one of these quick unit patterns (include a space right after the first quote mark so words do not touch numbers):
    • Whole numbers with units: #,##0" kg" displays 1,250 kg.
    • Decimals like work hours: 0.0" hrs" displays 8.5 hrs cleanly.
    • Count labels like boxes or days: 0" days" shows 14 days.
  5. Click the green Apply button.

Format Your Total Cell Cleanly Too

Click the bottom total cell holding your =SUM(B2:B20) formula and select the exact same custom format from Format > Number (Google Sheets remembers recent custom formats right near the top of that dropdown). Your grand total displays crisp matching labels automatically—for example 42.5 hrs—and updates instantaneously whenever someone types a plain number into the rows above.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.