+ Reply to Thread
Results 1 to 3 of 3

IF statement using multiple variables to give multiple outcomes

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    Hastings, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    IF statement using multiple variables to give multiple outcomes

    Hi Guys,

    Hope I've done this right as this is my first post.

    I'm looking to work out an IF statement based on a series of dates entered to give 1 of 3 possable outcomes.

    Where:
    A1: todays date (exmaple =NOW())
    B1: due date (exmaple 10/02/09)
    C1: completion date (example 12/02/09)
    D1: status (overdue, outstanding or completed)

    D1: =IF(A1>B1,"overdue",IF(A1<B1,"outstanding",IF(C1<=>A1 & B1,"completed")))

    I know the last part is totally wrong (symbols arranged in that manner), but to clarify i would like the date entered in C1 to override the other statements in the fomula to make it read "completed". If no date is entered in C1 then the formula will return either "overdue" or "outstanding" depending on the other dates in A1 and B1.

    Hope this all makes sense.

    Thanks for your efforts in advance.

    Stuart
    Last edited by stujordan; 02-10-2009 at 04:54 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF statement using multiple variables to give multiple outcomes

    Perhaps

    =IF(N(C1),"Completed",LOOKUP(SIGN(A1-B1),{-1,0,1},{"Outstanding","On-Time","Overdue"}))

  3. #3
    Registered User
    Join Date
    02-06-2009
    Location
    Hastings, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: IF statement using multiple variables to give multiple outcomes

    Spot On!

    Thanks DonkeyOte works brilliantly,

    Many thanks,

    Stuart

+ 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