+ Reply to Thread
Results 1 to 4 of 4

Multiple IF statements & Multiple Results

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    62

    Multiple IF statements & Multiple Results

    Hi,
    I need help with a formula.

    =IF($O5<>"Complete",IF(AND($S5<$B$1,$S5>=DATE(2012,10,1),$R5<=DATE(2012,10,31)),"Late"," "))*IF($O5="Running",IF(AND($B$1<=DATE(2012,10,31)),"OT",""))

    This is what I have, and it currently just returns #Value.
    Cell O5 contains various statuses.
    Cell S5 contains a start date, R5 a completion date and B1 todays date.

    Both formulas work on there own i.e.
    =IF($O5<>"Complete",IF(AND($S5<$B$1,$S5>=DATE(2012,10,1),$R5<=DATE(2012,10,31)),"Late"," "))

    And
    IF($O5="Running On Time",IF(AND($B$1<=DATE(2012,10,31)),"OT",""))

    But I would like them to both work for one cell.

    Any ideas?
    Cheers
    Last edited by Will_iam; 10-18-2012 at 06:48 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Multiple IF statements & Multiple Results

    Try combining your formula this way.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Since <>complete includes running, i have added running as the first condition. If its not running, your <>complete condition will run

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Multiple IF statements & Multiple Results

    Hi,

    Your first formula returns a space character (" ") if either of the two elements of the formula either side of multiplier * return False.
    You can't multiply non numeric values.

    Change the " " to a zero.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-06-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Multiple IF statements & Multiple Results

    @Sindhus


    I knew it would be something pretty simply. But sometimes you just need someone else to point it out! Thank you very much. Works perfectly!
    Last edited by Cutter; 10-18-2012 at 10:13 AM. Reason: Removed whole post quote

+ 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