View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sheila Sheila is offline
external usenet poster
 
Posts: 45
Default Single cell to display red in another cell

Bernard:

I tried the formula, without success. This is what I did:

I'm working with March and April tabs. Below is the code I entered in cell
"D39" on the April tab. Cell "AN35" on the April tab is the one I want to be
red.

February tab, red for "AN33"
March tab, red for "AN34"
April tab, red for "AN35" etc.


Sub tryme()

Range("D39") = Range("Mar!D39) & Range ("AN35") & Range("Mar!F36") & Range
& Range("AN25") & Range("Mar!AE36") & Range("AN26") & Range("Mar!AG36") &
Range ("AN27") & Range("Mar!F37") & Range("AN25") & Range("Mar!AE37") &
Range("AN26") & Range("Mar!AG37") & Range("AN27") & Range("Mar!F38") &
Range("AN25") & Range("Mar!AE38") & Range("AN26") & Range("Mar!AG38").&
Range("AN27")
mystart = Len(Range("MarD39")) + 1
mylen = Len(Range("AN35"))
Range("D39").Activate
With ActiveCell.Characters(Start:=mystart, Length:=mylen).Font
.ColorIndex = 3
End With
End Sub


I entered the above formula, and nothing happened that I can tell.

Thanks so much for your help.




"Sheila" wrote:

WOW ! Okay, I'll give it a shot (this will be my first time). Will let you
know.
Thank you very much.

"Bernard Liengme" wrote:

But if you are prepared to use VBA then try this:

Sub tryme()

Range("G12") = Range("A12") & Range("B12") & Range("C12") & Range("D12") &
Range("E12")
mystart = Len(Range("A12")) + Len(Range("B12")) + 1
mylen = Len(Range("C12"))
Range("G12").Activate
With ActiveCell.Characters(Start:=mystart, Length:=mylen).Font
.ColorIndex = 3
End With
End Sub

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Dave Peterson" wrote in message
...
If you keep the concatenation a formula, then you can't do this.

Sheila wrote:

When concatenating cells 1-5, to appear in cell 6, how do I get cell 3 to
appear red (with all others black) in cell 6?

--

Dave Peterson