Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
METCO1
 
Posts: n/a
Default Formating a text string?

I use subscripting in Excel for text cells, but would like to subscript in a
text string that includes numbers. For example, I need to subscript the "x"
in Standard Deviation = 0.125 lbs/hr NOx. Is there a way of doing this?
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
select this character in the formula bar and goto format - cells

--
Regards
Frank Kabel
Frankfurt, Germany

"METCO1" schrieb im Newsbeitrag
...
I use subscripting in Excel for text cells, but would like to

subscript in a
text string that includes numbers. For example, I need to subscript

the "x"
in Standard Deviation = 0.125 lbs/hr NOx. Is there a way of doing

this?

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You can't use subscripting in a cell with a formula.

You could use an event macro to build the text string and format it.
Assume your formula is


="Standard Deviation = " & STDEV(B1:B100) & " lbs/hr NOx"

Put something like this in the worksheet code module (right-click the
worksheet tab and choose View Code):

Private Sub Worksheet_Calculate()
Const STEXT = "Standard Deviation = $$ lbs/hr NOx"
Dim sStdDev As String

sStdDev = Format(Application.StDev(Range("B1:B100")), "0.000")
With Range("A1")
.Value = Application.Substitute(STEXT, "$$", sStdDev)
.Characters(Len(.Text), 1).Font.Subscript = True
End With
End Sub

Change your ranges to suit.


If you're not familiar with macros, see David McRitchie's "Getting
Started with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
METCO1 wrote:

I use subscripting in Excel for text cells, but would like to subscript in a
text string that includes numbers. For example, I need to subscript the "x"
in Standard Deviation = 0.125 lbs/hr NOx. Is there a way of doing this?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove all spaces in a text string dn Excel Discussion (Misc queries) 3 April 2nd 23 07:20 PM
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 01:24 AM
How do I rotate a text box Kent Charts and Charting in Excel 2 December 17th 04 01:13 AM
Text Cuts Off Jeff Excel Discussion (Misc queries) 3 November 30th 04 03:07 AM
formating text cells Cathyinliberty Excel Discussion (Misc queries) 3 November 29th 04 12:52 AM


All times are GMT +1. The time now is 07:52 PM.

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

About Us

"It's about Microsoft Excel"