+ Reply to Thread
Results 1 to 11 of 11

multiple if statments

  1. #1
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    multiple if statments

    Hi
    In the yellow column of the attached I need a formula the returns the following "On Time" or "Overdue" using the following information: If the date in column D is greater that the date in column B then "Overdue" if not return "On Time". However if there is no date in the column D cell then if Todays date is greater than the date in column B return "Overdue" if not return On "Time"

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: multiple if statments

    Hi

    Try in C2

    =IF(AND(D2="";B2<TODAY());"OVERDUE";IF(D2>B2;"OVERDUE";"ON TIME"))

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: multiple if statments

    Maybe:

    =IF(IF(D2<>"",INT(D2),INT(TODAY()))>INT(B2),"Overdue","OnTime")

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: multiple if statments

    Brilliant thank you very much. I was wondering how does that formula work?

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: multiple if statments

    Which one?

  6. #6
    Registered User
    Join Date
    02-18-2011
    Location
    Boston, USA
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: multiple if statments

    Sorry the one you gave me.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: multiple if statments

    =IF(IF(D2<>"",INT(D2),INT(TODAY()))>INT(B2),"Overdue","OnTime")

    INT(B2) and INT(D2) take the integer part of the date/time in the celsl so that the time does not confuse the issue ... unless you want it to? Then, in both cases you are comparing just the date and not the time.

    IF(D2<>"",INT(D2),INT(TODAY()) ... this checks if D2 is blank; if it's not, it uses INT(D2) in the comparison; if it is, it uses TODAY() in the comparison

    And then it's just a straightforward comparison; is one date greater than the other.

    I hope that makes sense.

    Regards, TMS

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: multiple if statments

    @TMS.

    This is a dublicate post!!!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: multiple if statments

    @Fotis: not sure what you mean. My original response did double post (good old forum software) but I deleted the second copy. The most recen response stared by stating the original formula and breaking it down.

    Are you saying that the whole thread is a duplicate?

    Right now, I'm not that fussed

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: multiple if statments

    @ Tms.

    I DID JUST a joke. your Original response did double post but YOU deleted the second copy.

    I saw it, BEFORE, you delete and made this joke, for the usual forum problems...

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: multiple if statments

    @Fotis: sorry, the whole thing is a bit of a joke at the moment so it's difficult to know what to take seriously

+ 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