View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Range to echo format (hilite/fontcolors) of sister range?

Here is an event macro for cells A1 and B1. If you change the format of cell
A1 and select another cell, then the format of A1 will be copied over to B1:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set r = Range("A1")
If Intersect(r, Target) Is Nothing Then
Application.EnableEvents = False
Range("A1").Copy
Range("B1").PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Target.Select
Application.EnableEvents = True
End If
End Sub

--
Gary''s Student - gsnu200769


"Schooner" wrote:

MS XL2007: Is there an efficient way to embed "color of cell RnCm = color of
cell RnC(m-x)" where c1 rows are manually changed from time to time? So that
a cousin cell a few rows over automatically reflects a hilite/font color
change manually applied to the the corresponding row in the first column?
Data in both columns is text/general. Obviously copy/paste-format would do
it inelegantly, a macro could presumably lookup & apply color somehow (still
a bit clunky), but I seek a formulaic/automatic method.

Schooner