+ Reply to Thread
Results 1 to 2 of 2

Conditional Font Color

  1. #1
    Jim Brass
    Guest

    Conditional Font Color

    How can I change the Font color based on a number?

    I tried:

    For Each Cell In Selection

    On Error Resume Next

    If Cell.Value < 140 Then Cell.Interior.ColorIndex = 30
    If Cell.Value < 140 Then Cell.Font.ColorIndex = 2


    'other code for lower temperatures

    Next


    Thanks for any help! Jim



  2. #2
    Gary Keramidas
    Guest

    Re: Conditional Font Color

    seems to work here, you just have to have the cells selected before you
    execute the code

    --


    Gary


    "Jim Brass" <[email protected]> wrote in message
    news:[email protected]...
    > How can I change the Font color based on a number?
    >
    > I tried:
    >
    > For Each Cell In Selection
    >
    > On Error Resume Next
    >
    > If Cell.Value < 140 Then Cell.Interior.ColorIndex = 30
    > If Cell.Value < 140 Then Cell.Font.ColorIndex = 2
    >
    >
    > 'other code for lower temperatures
    >
    > Next
    >
    >
    > Thanks for any help! Jim
    >




+ 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