How do I use a relative cell reference that will copy the format?

B

Brian

What I'm trying to do is copy over the formatting that I've done to a cell
when I'm trying to use a relative reference to that cell. Aside from pasting
the format, is there some other way to copy the formatting as well as the
values within the cell?
 
B

Brian

I'm using excel 2007 so unfortunately the edit function is no more. Just to
clarify, the cell that i'm wishing to copy has half of the text formatted one
way and the other half formatted a different way. If anyone knows how to
conditionally format cells so anything after a "?" is formatted in a certain
way, that would also help solve the problem.
 
G

Gord Dibben

If you mean you have a cell linked to another, there is no way to link the
formatting unless the formatting is due to Conditional Formatting.

If you don't mind just getting value from one cell to another along with
formatting, see JB's reply.


Gord Dibben MS Excel MVP
 
G

Gord Dibben

Not a format, but a macro.

Sub Color_Bits()
Dim mylen As String
Dim rCell As Range
Dim n As Long
mylen = Len(myword)
For Each rCell In Selection
n = 1
Do
n = InStr(n, UCase(rCell.Value), "?")
If n > 0 Then
rCell.Characters(n + 1, mylen).Font.Color = vbRed
n = n + 1
End If
Loop Until n = 0
Next rCell
End Sub


Gord Dibben MS Excel MVP
 
Top