Results 1 to 9 of 9

Skip Cells based on colour of cell

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-30-2014
    Location
    Mosman, Australia
    MS-Off Ver
    2013
    Posts
    118

    Skip Cells based on colour of cell

    Hi there,

    I have a macro where it will skip cells that have diagonal lines in the cell. This works well because i use it for data entry and sometimes theres a specific cell i don't need to put data into, therefore i put the diagonal lines in the cell and it will automatically skip the cell when entering the data. The VBA code is as follows:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If ActiveCell.Borders(xlDiagonalDown).LineStyle = xlContinuous Then
            ' Has Line, Select Next Cell
            ActiveCell.Offset(1, 0).Range("A1").Select
        End If
    End Sub
    Now i'm using conditional formatting to highlight these cells in a shade of grey but i can't conditionally format the cell to place the diagonal lines in. Is there a VBA code similar to above where i can have the cell skipped over based on the colour of the cell? The RGB colour of the grey i'm using is:
    R: 128
    G: 128
    B: 128

    Is this possible?

    Thanks
    Last edited by Cremorneguy; 08-30-2014 at 12:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change colour of cells based on another cell's colour (Not value)
    By LTrain89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2013, 08:44 PM
  2. Highlight or colour a cell or cells based on cells in another range.
    By baffld in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2012, 08:41 PM
  3. Change Colour of 3 Cells based on Value of Other Cell
    By hazza147 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2010, 05:57 AM
  4. Colour Cells based on the value of another cell
    By Macca_GB in forum Excel General
    Replies: 1
    Last Post: 03-27-2010, 03:10 AM
  5. [SOLVED] How do I set a colour to 4 cells based on the value of a cell
    By Andy64 in forum Excel General
    Replies: 1
    Last Post: 09-06-2005, 02:05 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