+ Reply to Thread
Results 1 to 7 of 7

How to put 'text' into a conditional format

  1. #1
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    How to put 'text' into a conditional format

    The solution to this escapes me, but I'm sure it's quite easy. I would like column H of my sample file (attached) to change colour and say 'Service Due' when it comes within 60 days of the service date in column D.
    It changes colour, but I cannot workout how to put the text message into the cell. If there is a betteror easier way, then as always I'm open to suggestions
    Thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to put 'text' into a conditional format

    Hi
    Could you put an IF formula in the cell (H5) itself like this:
    =IF(AND(NOT($D5=""),$D5-60<TODAY()),"Service Due","")

    Vidar

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to put 'text' into a conditional format

    You need to just incorporate your conditional formula into an IF() formula within the cell

    E.g. in H5:

    =IF(AND(NOT($D5=""),$D5-60<TODAY()),"Service Due","")

    copied down.

    Note NOT($D5="") is better written as $D5<>""
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: How to put 'text' into a conditional format

    Excellent response thanks to you both, it works but then how do I get the cell colour to change at the same time?

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to put 'text' into a conditional format

    Leave the conditional format in place as well... you need both.

  6. #6
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: How to put 'text' into a conditional format

    I'm sorry about this, but I've made a mess of it. Could you take another look at my attached file. Something has gone wrong in H5 and H8 shouldn't be coloured in.
    I noticed under the conditional format (accessed via the toolbar) that all my 'D' column refer to D5, I expected them to change number as I dragged them down.
    Thanks again
    Attached Files Attached Files

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to put 'text' into a conditional format

    Formula in H5 should be:

    =IF(AND($D5<>"",$D5-60<TODAY()),"Service Due","")

    copied down.

    Then select all of D5:D10 and invoke conditional formatting, delete the conditions there and repeat using formula:

    =IF(AND($D5<>"",$D5-60<TODAY()),"Service Due","")

    or

    =$H5="Service Due"

    CF knows that it should apply to the other cells in a relative manner since no $ before the 5.
    Last edited by NBVC; 09-12-2012 at 02:56 PM. Reason: last formula option should reference $H5 not $D5

+ 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