A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Superscript in custom format



 
 
Thread Tools Display Modes
  #1  
Old September 14th, 2005, 10:05 PM
Sloth
external usenet poster
 
Posts: n/a
Default Superscript in custom format

I have started to use custom formats to display units. For instance when I
want a number to display as 24" or 58.2 lbf. I don't know if this is the
proper way to do this, but it works great for me. The problem is I want one
to display as 28in2 where the 2 is a superscript. Currently I have the
output in one cell and the next cell is text "in2" with the "2" superscripted
to signify inches squared. I would like a solution where I could combine the
two cells into one cell that is still treated as a number when referencing
from other cells.
  #2  
Old September 15th, 2005, 12:41 AM
Gord Dibben
external usenet poster
 
Posts: n/a
Default

Sloth

Use custom formatting on the numbers.

i.e. FormatCellsCustom.

Enter 0" in" then hold ALT Key and hit 0178 on number pad at right side of
keyboard.

No need for the extra cells. Can all be done in one cell and the 28 remains
as a number.

If you can use a macro it is possible to select a great whack of cells and
just hit a button.

Sub sq_inches()
Selection.NumberFormat = "0"" in" & Chr(178) & """"
'0179 for cubic inches
End Sub


Gord Dibben Excel MVP

On Wed, 14 Sep 2005 14:05:04 -0700, "Sloth"
wrote:

I have started to use custom formats to display units. For instance when I
want a number to display as 24" or 58.2 lbf. I don't know if this is the
proper way to do this, but it works great for me. The problem is I want one
to display as 28in2 where the 2 is a superscript. Currently I have the
output in one cell and the next cell is text "in2" with the "2" superscripted
to signify inches squared. I would like a solution where I could combine the
two cells into one cell that is still treated as a number when referencing
from other cells.


  #3  
Old September 15th, 2005, 03:35 PM
Sloth
external usenet poster
 
Posts: n/a
Default

That's pretty clever. I didn't even think to use symbols. Now I can make
in² and in³ but what about in4? Any ideas? That is pretty much all I need
except for maybe in-1. Thanks for the input

"Gord Dibben" wrote:

Sloth

Use custom formatting on the numbers.

i.e. FormatCellsCustom.

Enter 0" in" then hold ALT Key and hit 0178 on number pad at right side of
keyboard.

No need for the extra cells. Can all be done in one cell and the 28 remains
as a number.

If you can use a macro it is possible to select a great whack of cells and
just hit a button.

Sub sq_inches()
Selection.NumberFormat = "0"" in" & Chr(178) & """"
'0179 for cubic inches
End Sub


Gord Dibben Excel MVP

On Wed, 14 Sep 2005 14:05:04 -0700, "Sloth"
wrote:

I have started to use custom formats to display units. For instance when I
want a number to display as 24" or 58.2 lbf. I don't know if this is the
proper way to do this, but it works great for me. The problem is I want one
to display as 28in2 where the 2 is a superscript. Currently I have the
output in one cell and the next cell is text "in2" with the "2" superscripted
to signify inches squared. I would like a solution where I could combine the
two cells into one cell that is still treated as a number when referencing
from other cells.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Toolbars, Drop-Down Menus Rick New Users 1 September 21st, 2005 11:17 AM
Custom percent format needed Will Fleenor Worksheet Functions 1 June 29th, 2005 02:57 AM
custom format & saving kdw General Discussion 6 June 23rd, 2005 12:22 AM
Excel - Custom cell text format codes bgraham Worksheet Functions 1 August 12th, 2004 05:24 PM
Zero Fill Fields with Custom Format Randy Worksheet Functions 1 October 14th, 2003 03:34 AM


All times are GMT +1. The time now is 12:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.