Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default VBA to superscript a part of a cell

Thanks guys, i'll test your suggestions and let you know. In my report
it can only be "1st" no "2nd" or "3rd" but thanks anyways.


In that case, the macro code can be reduced to this...

Sub SuperScriptOrdinals()
Dim X As Long, Position As Long, C As Range
For Each C In Range("B2:B15")
Position = InStr(C.Value, "1st")
If Position Then C.Characters(Position + 1, 2).Font.Superscript = True
Next
End Sub

--
Rick (MVP - Excel)
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
VBA to superscript a part of a cell Ron Rosenfeld Excel Programming 3 April 16th 10 12:01 PM
VBA to superscript a part of a cell Peter T Excel Programming 4 April 16th 10 11:30 AM
VBA to superscript a part of a cell Ron Rosenfeld Excel Programming 0 April 16th 10 02:00 AM
VBA to superscript a part of a cell Gord Dibben Excel Programming 0 April 15th 10 11:12 PM
how do i superscript part of a cell in MS Excel? allan Excel Discussion (Misc queries) 0 July 13th 05 08:12 PM


All times are GMT +1. The time now is 08:13 PM.

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

About Us

"It's about Microsoft Excel"