ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   cell properties changes (https://www.excelbanter.com/excel-discussion-misc-queries/124129-cell-properties-changes.html)

faeiz2

cell properties changes
 
Hi all, how do I make a cell to follow any changes I make to another
cell. Example I change border & shading for A1 and I want it reflect in
A2 etc.


Gary''s Student

cell properties changes
 
You can do this manually or automatically by using VBA.

Manually:

1. select cell A1 and pull-down Edit Copy
2 select cell A2 and pull-down Edit PasteSpecial with formats checked

Automatically:

1. enter this line in a standard module:

Public readyy As Boolean

2. in Worksheet code enter:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then
If readyy Then
Range("A1").Copy
Range("A2").PasteSpecial Paste:=xlPasteFormats
readyy = False
Exit Sub
End If
Else
readyy = True
End If
End Sub


After this any formating changes you make to A1 will be reflected in A2.


If you are not familiar with VBA see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"faeiz2" wrote:

Hi all, how do I make a cell to follow any changes I make to another
cell. Example I change border & shading for A1 and I want it reflect in
A2 etc.




All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com