How do I use superscript font in text from a formula

spurs

Active Member
Joined
Oct 18, 2006
Messages
479
Office Version
  1. 2016
  2. 2013
  3. 2010
  4. 2007
  5. 2003 or older
Platform
  1. Windows
If I am typing for example
in2 in a cell without an equal sign in front of it, I an adjust the font to superscript the 2 so it appears as squared insead of in2 (this forum wont let me superscript)
once that cell is formatted and working properly, if i merely put an equal sign in front of it and quotations for text ie ="in2" the 2 is no longer superscript and i cannot find a way to control it to superscript to a sqquare

Anyone have insight as to how to do this?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
For superscript 2 and 3 you can use CHAR(178) and CHAR(179)
For superscript 4 to 9 you can use UNICHAR(xxxx), with xxxx ranging from 8308 to 8313

Samples of formulas are in the attached XL2BB minisheet; its rendering is in the attached image (but it seems ok also in the XL2BB minisheet)

You may find the list of Superscript and Subscript unicode coding here: Superscripts and Subscripts (Unicode block) - Wikipedia

Cartel7
ABCD
1
2in²="in"&CHAR(178)
3in³="in"&CHAR(179)
4in⁴="in"&UNICHAR(8308)
5in⁹="in"&UNICHAR(8313)
6
7
Foglio2
Cell Formulas
RangeFormula
A2A2="in"&CHAR(178)
A3A3="in"&CHAR(179)
A4A4="in"&UNICHAR(8308)
A5A5="in"&UNICHAR(8313)
 

Attachments

  • UNICODE_Immagine 2023-04-29 191214.jpg
    UNICODE_Immagine 2023-04-29 191214.jpg
    19.6 KB · Views: 5
Upvote 0
Thank you. What about -1 as a power including the minus sign?
 
Upvote 0
Try...

Excel Formula:
="in"&UNICHAR(8315)&CHAR(185)

Hope this helps!
 
Upvote 0
Thank you. I have been wondering how to fix this for a long time!
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top