Linking values and attributes between cells


Posted by Jeff D on May 03, 2001 1:56 PM

I have a need to link not only data between cells but also the attributes.

For example: Cell (a0) is linked to (a1) on another worksheet. If I put in the value 7 in (a0), 7 will appear in (a1). BUT, if I make the cell (a0) a red background I need the cell in (a1) to have a red background also.

HOW DO I DO THIS???



Posted by Dave Hawley on May 03, 2001 2:08 PM

Hi Jeff

You will need some VBA to do this.

Right click on the Sheet Name Tab and select "View Code", then paste in this code and change the addresses to suit.


Private Sub Worksheet_Change(ByVal Target As Range)
'Written by OzGrid Business Applications
'www.ozgrid.com

If Target.Cells.Count > 1 Then Exit Sub
If Target.Address = "$AO$1" Then
Target.Copy Destination:=Range("A1")
Application.CutCopyMode = False
End If

End Sub


Push Alt+Q to return to Excel and Save.


Dave

OzGrid Business Applications