PDA

View Full Version : Sleeper: Numberformat, in^3 vs in?



MrRhodes2004
07-13-2005, 08:52 AM
Selection.NumberFormat = "#.0## ""in?"""

I use the above formatting to format the cell to show square inches or inch to the second power. I also use a similar one for cubic inches. These are easy since the squared (?) and cubed (?) are available using alt+0178 or alt+0179. This keeps the cell as a number and usable. If I were to place the text in the cell with the number, the cell would become a string and I do not want that.

I need one for inch to the 4th. I do not like the in^4 that would show it.

Is there using ONLY NumberFormat using a superscript 4?
Selection.NumberFormat = "#.0## ""in(superscript 4)"""

Thanks for the help.

Killian
07-13-2005, 12:00 PM
Well I thought this might help


Selection.NumberFormat = "#.0## ""in4"""
Selection.Characters(Len(Selection.Text), 1).Font.Superscript = True

but it doesn't appear to work on cells that are not in text format.
I suppose I shouldn't be surprised since the characters object "Represents characters in an object that contains text". You need your cell to contain a number (even though it still has a text property) so I don't think this is do-able :dunno