Hi,
I want to superscript the text with red color. But now only a active cell is change to superscript with red color after running the macro.
any help will be appreciated.
Thanking you.
Hi,
I want to superscript the text with red color. But now only a active cell is change to superscript with red color after running the macro.
any help will be appreciated.
Thanking you.
Sincerely,
mso3
Try setting rngCell to a user selected range using InputBox. Then iterate through each cell in rngCell.
![]()
Sub SuperscriptRed() Dim x As Long Dim rngCell As Range Set rngCell = Application.InputBox(Prompt:="Please Select Range", Title:="Range Select", Type:=8) 'If Not Intersect(Target, Columns("b:bh")) Is Nothing Then If Not Intersect(ActiveCell, Columns("b:bh")) Is Nothing Then For Each c In rngCell With c If .Row >= 8 Then If .Value Like "*[+]*" Then If .HasFormula Then .Formula = .Value x = InStr(.Value, "+") .Characters(x).Font.Superscript = True .Characters(x).Font.ColorIndex = 3 End If End If End With Next c End If MsgBox "Done!", 64 End Sub
See also the reply in your other thread: http://www.excelforum.com/excel-prog...reference.html
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks