1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hi Guest, welcome to the TES Community!

    Connect with like-minded education professionals and have your say on the issues that matter to you.

    Don't forget to look at the how to guide.

    Dismiss Notice

Conditional Formatting-More than 3 (Excel 2003)

Discussion in 'Computing and ICT' started by madcat, Oct 16, 2011.

  1. madcat

    madcat Occasional commenter

    You could use the ASC() function to get the ASCII value of the letters
    ASC("A") will return 65 etc
     
  2. CaseBusy

    CaseBusy New commenter

    hello again
    i have had a go at putting some other code which works as long as its targetting 1 column. would you happen to know how to target all colunms
    this is the code i am using:
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 1 Or Target.Cells.Count > 1 Then Exit Sub
    With Target.Interior
    Select Case UCase(Target.Value)
    Case "D"
    .ColorIndex = 3
    Case "C"
    .ColorIndex = 10
    Case "B"
    .ColorIndex = 5
    Case "A"
    .ColorIndex = 6
    Case Else
    .ColorIndex = 0
    End Select
    End With
    End Sub
    Thanks
     

Share This Page