Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Linking cells by cell text.......................TIA
Hi,
On sheet one, I have a large table with unique 4 digit hexidecimal values in each cell. On sheet two, I have uniquely colored columns of cells of hexidecimal values. The same values picked from What I want to happen is to have get the cells automatically assign themselves a color from the color group they are assigned to from sheet two. So, if I type 04AC in the red column in sheet 2. The corresponding 04AC cell in sheet one would turn red. Thanx all for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Linking cells by cell text.......................TIA
You could put the code in the Worksheet_Change event of the sheet you are
using to enter the numbers. The code assumes the entire format - not just cell color - will be the same but could be modified if that is not OK. To modify it you would need to read Target's Interior.Color and then set the FoundRange Interior to the same color. Private Sub Worksheet_Change(ByVal Target As Range) Dim InputRange As Range, MatchRange As Range, FoundRange As Range Set InputRange = Range("A:D") ' the color-coded columns on sheet2 Set MatchRange = Sheets("Sheet1").Range("A1:C4") ' The table of codes on sheet 1 ' First, see if the cell changed is in one of the columns (don't want to run the find for any other cell entries, would waste time) If Not (Intersect(Target, InputRange) Is Nothing) Then ' Now, look for the value on sheet1 Set FoundRange = MatchRange.Find(Target.Value) If Not FoundRange Is Nothing Then ' If found... Target.Copy FoundRange.PasteSpecial xlPasteFormats Application.CutCopyMode = False End If End If End Sub "Boll Weevil" wrote: Hi, On sheet one, I have a large table with unique 4 digit hexidecimal values in each cell. On sheet two, I have uniquely colored columns of cells of hexidecimal values. The same values picked from What I want to happen is to have get the cells automatically assign themselves a color from the color group they are assigned to from sheet two. So, if I type 04AC in the red column in sheet 2. The corresponding 04AC cell in sheet one would turn red. Thanx all for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking text cells between 2 worksheets | Excel Worksheet Functions | |||
Linking two cells of text together | Excel Worksheet Functions | |||
Linking cells with text | Excel Discussion (Misc queries) | |||
Linking cells with text to each other | Excel Worksheet Functions | |||
linking text cells | Excel Worksheet Functions |