+ Reply to Thread
Results 1 to 9 of 9

Change Font Colour If

  1. #1
    Registered User
    Join Date
    08-13-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Change Font Colour If

    Hello!

    I need some help writing a code that would change the font colour to red in column P if the date in that cell is later than the date in column L of that same row. Any help would be greatly appreciated
    Last edited by stage.fright; 08-13-2010 at 01:31 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Change Font Colour If

    Maybe this will work for you:

    Please Login or Register  to view this content.
    Edit:
    You'll have to change the range selections to accommodate your worksheet
    Last edited by Mordred; 08-13-2010 at 12:42 PM.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Change Font Colour If

    Sorry about the edits, I misunderstood and thought you wanted the interior changed, it is proper now.
    Last edited by Mordred; 08-13-2010 at 12:45 PM.

  4. #4
    Registered User
    Join Date
    08-13-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Change Font Colour If

    Thanks so much!!! If I'm dealing with a range of P10:P500, how do I modify the code? I keep doing it wrong; what confuses is me is how to control it to only look at that row…

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Change Font Colour If

    Why not Conditional Formatting?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Change Font Colour If

    Can't you just use conditional formatting?

    Select P10:P500
    Conditional Formatting > Cell Value > greater than
    Please Login or Register  to view this content.

    Applies to
    Please Login or Register  to view this content.

    Format...... Font > Red

    Hope this helps

    [EDIT]

    You beat me to it Roy
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    08-13-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Change Font Colour If

    I've thought about conditional formatting, but I need to apply it to the whole column, but it's not letting me do that. Unless I used the "formula value" option, but I'm not sure how to make that work either.

  8. #8
    Registered User
    Join Date
    08-13-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Change Font Colour If

    I wrote too soon. You guys are geniuses!! Thanks so much - that works perfectly. I kept trying to highlight all column L rather than just picking L10. Thanks again

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Change Font Colour If

    As post #7

    Caange Applies to to this
    Please Login or Register  to view this content.
    And =$L10
    to
    Please Login or Register  to view this content.
    Hope that helps

    [EDIT]

    The above works for the whole of Column P
    Last edited by Marcol; 08-13-2010 at 01:33 PM. Reason: near simultaneous posts

+ 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