Results 1 to 9 of 9

Conditional formating 7 conditions

Threaded View

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Conditional formating 7 conditions

    Hi all,

    I am running XL 2003 and it gives me only 3 conditions on conditional formating. But I need 7.
    I have a code but I can't adapt it to my new project as layout is totally different. Could someone have a look where changes need to be made in a code?

    Cells to be affected are K12:AE12

    Code:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If ActiveCell.Column = 4 Then
    ActiveCell.Font.ColorIndex = 1
    If ActiveCell.Value = "Black" Then ActiveCell.Font.ColorIndex = 2
    If ActiveCell.Value = "Orange" Then ActiveCell.Interior.ColorIndex = 44
    If ActiveCell.Value = "Yellow" Then ActiveCell.Interior.ColorIndex = 6
    If ActiveCell.Value = "Pink" Then ActiveCell.Interior.ColorIndex = 38
    If ActiveCell.Value = "Blue" Then ActiveCell.Interior.ColorIndex = 41
    If ActiveCell.Value = "Green" Then ActiveCell.Interior.ColorIndex = 4
    If ActiveCell.Value = "Red" Then ActiveCell.Interior.ColorIndex = 3
    If ActiveCell.Value = "Black" Then ActiveCell.Interior.ColorIndex = 1
    End If
    End Sub


    Thanks a lot!
    Last edited by ABSTRAKTUS; 04-16-2011 at 04:27 PM.

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