Hi all,
Is there a way of having the words "Expired" or "Live" appear in a cell adjoining a date?
The word "Live" would appear for dates in the future and the word "Expired" would appear for dates in the past.
And, if possible, I'd like to have the word "Expired" appear in black and the word "Live" appear in red.
Many thanks.
put a formula in the cell you want the words to appear such as:
this assumes that the date you are testing is in cell A2Code:=if(A2>today(),"Live","Expired")
to get the color of the words to change, just use conditional formatting using one rule would work, just select the column and go to conditional formatting (under the format menu) and type Live into the first rule and change the format to red the way you want. Press okay, and if it is not working, go back into the conditional format and make sure that the rule appears as ="Live", the problem can be that excel likes to add its own quotes so if you were to enter ="Live" first excel would convert it to =""Live"" which doesn't work, so just go back in and remove the second set of quotes.
Hope this helps.
If you can't figure out how a formula works, try stepping through it using "Evaluate Formula" in the Formula Auditing menu item in the tools menu!
If you want to see where your code went wrong, try stepping through it by clicking in the code and pressing F8 and watch as the magic happens!
If you are happy with any of the results, please add to the contributor's reputation by clicking the blue scales icon in the blue bar of the post.
Everstrivin
That works perfectly. Thank you very much indeed.
- Paul
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks