We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

excel help

In excel 2003 how can I make a column that has text in it and formated as text have a blue background if the date is before today?

I can do it if the column is a column of dates but not if it is text.

Comments

  • If the date is formatted as text and not date/time then Excel is not going to know that it is a date if you see what I mean.
    If they were formatted as dates then you would conditional format the column then use formula is =A1<NOW(). But sounds like you already know this?
    2010 Wins:
    10 x Dorito's & Dips, £2,000 Pre-Paid Visa card.
  • Try something like =(1*a1)<now()
    I'm dreaming of a white Christmas.
    But, if the white runs out, I'll drink the red.

  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    You should be able to get the results you want if you put this formula into the "conditional formatting" settings of cell A1, then copy the formatting to the other cells in that column.

    =IF(DATE(YEAR($A1),MONTH($A1),DAY($A1))<TODAY(),TRUE,FALSE)

    Hope that helps...
  • 12bdebt3
    12bdebt3 Posts: 446 Forumite
    Ninth Anniversary 100 Posts Combo Breaker
    You need to use conditional formatting: http://www.timeatlas.com/5_minute_tips/general/how_to_use_conditional_formatting_to_highlight_data

    or VBA but that's too advanced for what you seem to need.
  • Dave_C_2
    Dave_C_2 Posts: 1,827 Forumite
    edited 21 February 2011 at 6:19PM
    Not guaranteed, you could try formatting the text as a date. Select the column or the range of dates then Format>cells>date then pick the date format nearest to the text. It's worked for me in the past.
    Don't forget to make a copy of the excel file first - just in case.

    Thereafter it's a simple conditional format.
    In a cell say C1 enter the value =now()
    Highlight range of cells or column Format>conditional format then in the boxes Cell value is > Greater than > =$C$1 finally select the pretty colour of your choice.

    Failing that please post a few examples of the text that represents dates and we'll try to help.

    Dave
  • johnmc
    johnmc Posts: 1,265 Forumite
    A date is actually a number, interpreted by Excel. You can do arithmatic with numbers.

    Text is not something you can use that way.

    "10 April 2011" is less than "1 January 2011", for instance.

    So, no, there's no way you can do that.
  • stevemcol
    stevemcol Posts: 1,666 Forumite
    You can make another cell equal to the text cell, then hide it if you want. Format the second cell as 'date', then conditionally format the first cell based on the date in the second.
    Apparently I'm 10 years old on MSE. Happy birthday to me...etc
  • Stompa
    Stompa Posts: 8,383 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    johnmc wrote: »
    A date is actually a number, interpreted by Excel. You can do arithmatic with numbers.

    Text is not something you can use that way.

    "10 April 2011" is less than "1 January 2011", for instance.

    So, no, there's no way you can do that.
    The DATEVALUE() function will convert a textual date to the appropriate number though.

    So conditional formatting set to:

    'Formula Is' =DATEVALUE(A1)<TODAY()

    should work just fine, assuming the dates are not in some really odd format.
    Stompa
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.5K Banking & Borrowing
  • 253.7K Reduce Debt & Boost Income
  • 454.4K Spending & Discounts
  • 245.5K Work, Benefits & Business
  • 601.4K Mortgages, Homes & Bills
  • 177.6K Life & Family
  • 259.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.