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![]()
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.
Maybe this will work for you:
Edit:![]()
Sub datecolor() If Range("P3").Value > Range("L3").Value Then Range("P3").Font.ColorIndex = 3 End Sub
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---
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.
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…
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
Can't you just use conditional formatting?
Select P10:P500
Conditional Formatting > Cell Value > greater than![]()
=$L10
Applies to![]()
=$P$10:$P$500
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.
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.
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![]()
As post #7
Caange Applies to to this
And =$L10![]()
=$P:$P
to
Hope that helps![]()
=$L1
[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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks