Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to change the format of how individual characters appear in a
linked cell while maintaining the link? For example my link: ='Front page'!N43 should equal: 4.6[2] where [2] equals a superscripted 2 colored blue. (unable to dupe this here hence [2].) Please let me know. Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
XL functions only return values to their calling cells, not formats.
You could, instead, use an event macro. Put this in your target (i.e., non Front Page) worksheet's code module: Private Sub Worksheet_Calculate() Dim rSource As Range Dim rCharFont As Font Dim i As Long On Error GoTo ExitSub With Application .ScreenUpdating = False .EnableEvents = False End With Set rSource = Worksheets("Front Page").Range("N43") With Range("A1") 'Change to suit .NumberFormat = "@" .Value = rSource.Text For i = 1 To Len(.Text) Set rCharFont = rSource.Characters(i, 1).Font With .Characters(i, 1).Font .Name = rCharFont.Name .FontStyle = rCharFont.FontStyle .Size = rCharFont.Size .Color = rCharFont.Color If rCharFont.Subscript Then .Subscript = True If rCharFont.Superscript Then .Superscript = True .Underline = rCharFont.Underline .Shadow = rCharFont.Shadow .OutlineFont = rCharFont.OutlineFont .Strikethrough = rCharFont.Strikethrough End With Next i End With ExitSub: With Application .EnableEvents = True .ScreenUpdating = True End With End Sub In article , ORLANDO V wrote: Is there a way to change the format of how individual characters appear in a linked cell while maintaining the link? For example my link: ='Front page'!N43 should equal: 4.6[2] where [2] equals a superscripted 2 colored blue. (unable to dupe this here hence [2].) Please let me know. Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you.
"JE McGimpsey" wrote: XL functions only return values to their calling cells, not formats. You could, instead, use an event macro. Put this in your target (i.e., non Front Page) worksheet's code module: Private Sub Worksheet_Calculate() Dim rSource As Range Dim rCharFont As Font Dim i As Long On Error GoTo ExitSub With Application .ScreenUpdating = False .EnableEvents = False End With Set rSource = Worksheets("Front Page").Range("N43") With Range("A1") 'Change to suit .NumberFormat = "@" .Value = rSource.Text For i = 1 To Len(.Text) Set rCharFont = rSource.Characters(i, 1).Font With .Characters(i, 1).Font .Name = rCharFont.Name .FontStyle = rCharFont.FontStyle .Size = rCharFont.Size .Color = rCharFont.Color If rCharFont.Subscript Then .Subscript = True If rCharFont.Superscript Then .Superscript = True .Underline = rCharFont.Underline .Shadow = rCharFont.Shadow .OutlineFont = rCharFont.OutlineFont .Strikethrough = rCharFont.Strikethrough End With Next i End With ExitSub: With Application .EnableEvents = True .ScreenUpdating = True End With End Sub In article , ORLANDO V wrote: Is there a way to change the format of how individual characters appear in a linked cell while maintaining the link? For example my link: ='Front page'!N43 should equal: 4.6[2] where [2] equals a superscripted 2 colored blue. (unable to dupe this here hence [2].) Please let me know. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I have a linked cell auto-size to fit the linked data? | Excel Discussion (Misc queries) | |||
Linked cells limited to ~253 characters unless source file open | Excel Worksheet Functions | |||
# of characters visible from a linked cell | Excel Discussion (Misc queries) | |||
using wildcard characters for filenames in externally linked files | Excel Discussion (Misc queries) | |||
Why is a linked cell restricted to 256 characters | Excel Discussion (Misc queries) |