Results 1 to 1 of 1

Vlookup and RGB Formatted cell acorrdingly.....

Threaded View

Extrude72 Vlookup and RGB Formatted... 02-27-2014, 09:03 AM
  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    Rome
    MS-Off Ver
    Excel 2010
    Posts
    1

    Vlookup and RGB Formatted cell acorrdingly.....

    Hi all, this is my first post here and below my questions:
    I have a File with 2 sheets:
    in the sheet named COLOR_TABLE I defined:
    a list of Color ID number (from 0 to 255) shown in column A
    the RGB color Values (between 0-255 each) for each ID Number shown in the range between columns B:D
    finlally, in the column E, the cells are filled according to RGB Values throug Private Sub as per attached Code Source

    Private Sub Worksheet_Change(ByVal Target As range)
    Dim rng As range, cell As range
    Dim i As Long
    
    Set rng = Intersect(Target, range("B:D"))
    If Not rng Is Nothing Then
        On Error Resume Next
        For Each cell In Target.Columns(1).Cells
            If Application.CountA(range("B" & cell.Row & ":D" & cell.Row)) < 3 Or _
                Application.Count(range("B" & cell.Row & ":D" & cell.Row)) < 3 Then GoTo next_row
            Cells(cell.Row, "E").Interior.Color = _
                RGB(Cells(cell.Row, "B").Value, Cells(cell.Row, "C").Value, Cells(cell.Row, "D").Value)
    next_row:
        Next cell
    End If
    End Sub
    Then, I have a sheet named COLOR_MAPPING where I defined:
    a list of elements (in three nested level) shown in the range between columns A:C
    the Level ID number and/or name and Color ID number for each element shown in the range between columns D:E (NOTE that this is the CASE 1 relevant to Projection view Representation of Elemenet)
    the RGB color Values (using VLOOKUP Formula referring the COLOR_TABLE sheet) shown in the range between columns F:H
    finally, in the column I the cells should be filled accordingly (maybe using Code Source like the above attached Private Sub?)
    the Level ID number and/or name and Color ID number for each element shown in the range between columns J:K (NOTE that this is the CASE 2 relevant to Cut view Representation of Elemenet)
    the RGB color Values (using VLOOKUP Formula referring the COLOR_TABLE sheet) shown in the range between columns L:N
    finally, in the column O the cells should be filled accordingly (maybe using Code Source like the above attached Private Sub?)

    Since I'm not able to modify the above attached Source VBA Code, I'm here hoping that somwbody will be able to help me on this matter
    Please Note that I would like to see change the background cell color whenever the relative ID number will be changed (even modified in E or K columns)

    Thanks in advance for your support....
    Last edited by Extrude72; 02-28-2014 at 04:23 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cell gets formatted as AM/PM
    By Zaeguzah in forum Excel General
    Replies: 1
    Last Post: 01-19-2011, 04:13 AM
  2. Replies: 6
    Last Post: 11-11-2009, 06:42 PM
  3. How to tell if a cell is % formatted
    By Dermot81 in forum Excel General
    Replies: 4
    Last Post: 10-24-2006, 09:06 AM
  4. Calculating with a formatted cell
    By Hulk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2005, 02:26 PM
  5. [SOLVED] Converting 'General' formatted cells to Text formatted cell using.
    By Zahid Khan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2005, 04:06 PM

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