+ Reply to Thread
Results 1 to 2 of 2

Conditional Formatting with VB across a table

  1. #1
    Registered User
    Join Date
    01-05-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Conditional Formatting with VB across a table

    Hi

    I've got a table of information on a tab that is generated from data input to other tabs in my workbook. I've set up conditional formatting so that the fill colour changes automatically from green to yellow, orange or red depending on the score achieved. I've been asked to add a grey colour for dates that haven't been completed. I've got the following code that will change the colour based on the date (in the two above merged cells) being incomplete

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Select Case Range("A1:B1")
    Case Is = "00/01/1900"
    Range("A2:B2").Interior.ColorIndex = 15
    End Select
    End Sub


    Does anyone know if there is a way to copy this across the cells in the entire table quickly, or if I'm just going about all in the completely wrong way? Any help or advice appreciated.

  2. #2
    Registered User
    Join Date
    04-19-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Conditional Formatting with VB across a table

    Excel has built in conditional formatting you could use that.

    Please Login or Register  to view this content.
    This will look at each individual cell. You can put that in the same event handler you are in.

+ 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