View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
christobal[_5_] christobal[_5_] is offline
external usenet poster
 
Posts: 1
Default Special string formatting

Sub test()

Range("B2").Value = "2,45M3"

showcubed Range("B2")

End Sub
Function showcubed(ByRef target As Range)
'
'sets the last character to superscript
'
Dim length As Long
length = Len(target.Value)

With target.Characters(Start:=length, length:=1).Font
.Superscript = True
End With

End Function

This is good for a single cell.
The report generator enters numerous rows into an unbound range who
4th column is represented by Grid_Value. The String is of no fixe
lengt

--
Message posted from http://www.ExcelForum.com