View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How do I use a relative cell reference that will copy the form

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

On Tue, 13 Jan 2009 12:20:01 -0800, Brian
wrote:

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.

"JBeaucaire" wrote:

Give this a try:

Edit PasteSpecial Values and number formats
--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Brian" wrote:

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?