+ Reply to Thread
Results 1 to 7 of 7

change true or false to text

  1. #1
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    change true or false to text

    Hi i have this formula and need to change true and false to text for both the expressions
    =OR(E23<=DATE(YEAR($L$2),MONTH($L$2)+$J$2,DAY($L$2)),($L$2>E23))

    what im trying to do is e23 has a static date (food sell by dates)and if that date gets within 3 month (J2) period of todays date (L2) i want it to say "warning" if e23 is equal to or older than todays date i want it to say out of date.

    L2 has =today()
    J2 has the number of months in it for the warning

    Please help many thanks
    Last edited by Directlinq; 01-27-2009 at 02:55 PM.

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

    Re: change true or false to text

    Do you mean?

    =IF(OR(E23<=DATE(YEAR($L$2),MONTH($L$2)+$J$2,DAY($L$2)),($L$2>E23)),"warning","out of date")
    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.

  3. #3
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    Re: change true or false to text

    if e23 has a date that is further into the future than j2 (months) the box is blank or says "All Good"
    if e23 has a date that is less than j2 (months) into the future the box says "warning"
    if e23 has a date equal to or older than todays date L2 it says "out of date"

    Sorry for the confusion

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: change true or false to text

    =IF(E3<=TODAY(),"out of date",IF(AND(E3>TODAY(),E3<DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY()))),"warning","all good"))
    or if number of months in J2
    =IF(E3<=TODAY(),"out of date",IF(AND(E3>TODAY(),E3<DATE(YEAR(TODAY()),MONTH(TODAY())+J2,DAY(TODAY()))),"warning","all good"))
    or even

    =IF(E3<=L2,"out of date",IF(AND(E3>L2,E3<DATE(YEAR(L2),MONTH(L2)+J2,DAY(L2))),"warning","all good"))
    Last edited by martindwilson; 01-27-2009 at 02:52 PM.

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

    Re: change true or false to text

    So if E23 had tomorrow's date, wouldn't the 2nd and 3rd condition both apply?

  6. #6
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    Re: change true or false to text

    Brilliant thanks you very much

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

    Re: change true or false to text

    I guess I must have misinterpreted your requirement

+ 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