# Question about custom number format in Excel

**URL:** <https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393>\
**Category:** Factual Questions\
**Created:** [May 9, 2012, 3:03pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393 "2012-05-09T15:03:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [May 9, 2012, 3:03pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/1 "2012-05-09T15:03:45Z")

</div>

I like to use custom number formatting in Excel to append units to measurement data. As an example, I would use the following custom format to append the letter **m** (for meters) to a number:

0.0" m"

But let’s say the units were something a bit more complex, like **m[sup]4[/sup] kg[sup]-2[/sup]**. Is there a way to do this using custom formatting?

---

<div class="post-metadata">

**Author:** ![spanna](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@spanna](https://boards.straightdope.com/u/spanna)\
**Post date:** [May 9, 2012, 3:45pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/2 "2012-05-09T15:45:02Z")

</div>

If you have a font with the special characters you need then using the custom number format as you already have but using ALT+unicode will work

(ie ALT+253 say for ² )

---

<div class="post-metadata">

**Author:** ![Rhythmdvl](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rhythmdvl](https://boards.straightdope.com/u/Rhythmdvl)\
**Post date:** [May 9, 2012, 3:52pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/3 "2012-05-09T15:52:31Z")

</div>

What if the exponent varies?

---

<div class="post-metadata">

**Author:** ![spanna](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@spanna](https://boards.straightdope.com/u/spanna)\
**Post date:** [May 9, 2012, 4:02pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/4 "2012-05-09T16:02:35Z")

</div>

> [@Rhythmdvl](#):
>
> What if the exponent varies?

thats why I had to say if you had a font with the symbol you want

¹³² are ALT+251 ALT+252 AND ALT+253 in many fonts

I’m just looking around to see if i can resolve the issue in a better way

Hopefully someone will come along who knows a better solution

---

<div class="post-metadata">

**Author:** ![Roland\_Orzabal](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@Roland\_Orzabal](https://boards.straightdope.com/u/Roland_Orzabal)\
**Post date:** [May 9, 2012, 4:59pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/5 "2012-05-09T16:59:25Z")

</div>

Do you just need sub- and superscripts? If so, you can highlight the text you want to change, right click, select Format Cells, and then check Subscript or Superscript (under Effects). It’ll only alter the text you highlighted.

(ETA: Just to be clear, for your example, you’d just type “m4kg-2”, highlight the 4 and do the above, then repeat for the -2.)

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [May 9, 2012, 5:23pm UTC](https://boards.straightdope.com/t/question-about-custom-number-format-in-excel/621393/6 "2012-05-09T17:23:33Z")

</div>

> [@Roland\_Orzabal](#):
>
> Do you just need sub- and superscripts? If so, you can highlight the text you want to change, right click, select Format Cells, and then check Subscript or Superscript (under Effects). It’ll only alter the text you highlighted.
> 
> (ETA: Just to be clear, for your example, you’d just type “m4kg-2”, highlight the 4 and do the above, then repeat for the -2.)

This works with regular 'ol text in cells. But it doesn’t work custom number formatting.
