Range to echo format (hilite/fontcolors) of sister range?
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 |
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 |
Range to echo format (hilite/fontcolors) of sister range?
Thanks, playing with it, have to fiddle it a bit (don't want to carry over
stocksymbol subscripts to text column, just b/g color, will "backtrack" the transfer by adding unbold). Thanks for assist - Schooner "Gary''s Student" wrote: 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 |
All times are GMT +1. The time now is 02:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com