+ Reply to Thread
Results 1 to 2 of 2

Linking cells by cell text.......................TIA

Hybrid View

  1. #1
    Boll Weevil
    Guest

    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. #2
    K Dales
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1