+ Reply to Thread
Results 1 to 5 of 5

IF statement to include 3 conditions and outcomes based on dates and blank cells

  1. #1
    Registered User
    Join Date
    06-13-2019
    Location
    Sheffield, England
    MS-Off Ver
    Office 365
    Posts
    8

    IF statement to include 3 conditions and outcomes based on dates and blank cells

    Hi,
    I just can't get a nested IF statement to work with 3 conditions and outcomes. Not sure where I'm going wrong.

    I need the formula in column D to look at a date, (cell A2) and base the outcomes on one of these 3 conditions:
    If the date in cell K5 is before what's in A2 = Expired
    If the date in cell K5 is after what's in A2 = Live
    If there is nothing in cell K5 = Pending

    It needs to copy down the column too.

    I've attached a sample workbook for reference with examples of the 3 conditions and outcomes.

    I'm not sure if it's the dates or the blank cell that's causing me the trouble so any help is greatly appreciated.

    Thanks very much,

    Lindsey
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    62,194

    Re: IF statement to include 3 conditions and outcomes based on dates and blank cells

    Try this:

    =IF(K5="","Pending",IF(K5<$A$2,"Expired","Live"))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 for Mac OSX & Windows
    Posts
    7,234

    Re: IF statement to include 3 conditions and outcomes based on dates and blank cells

    Edit - solution already posted as i was loading spreadsheet

    =IF(K5="","pending",IF(K5<=$A$2,"Expired","Live")

    you may want to coinsider
    =IF(B5="","",IF(K5="","pending",IF(K5<=$A$2,"Expired","Live")))
    so if nothing in B5 - it puts a blank in the cell rather then Pending
    so you can copy down and not have pending in all the blank rows
    Attached Files Attached Files
    Last edited by etaf; 12-29-2021 at 08:07 AM.
    Wayne

    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    06-13-2019
    Location
    Sheffield, England
    MS-Off Ver
    Office 365
    Posts
    8

    Re: IF statement to include 3 conditions and outcomes based on dates and blank cells

    Brilliant, thanks very much.

    I was using too many arguments I think and complicating it.

    Hope you have a great new year.

    Lindsey

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    62,194

    Re: IF statement to include 3 conditions and outcomes based on dates and blank cells

    Are you addressing both of us?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 12-06-2018, 12:50 PM
  2. [SOLVED] Refine yes no if statement to include Blank
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2016, 12:28 PM
  3. Replies: 6
    Last Post: 08-20-2014, 12:14 PM
  4. [SOLVED] How to not include blank dates help please!
    By jennieS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-14-2013, 02:00 PM
  5. [SOLVED] 3 Outcomes Conditional Formatting based on 4 blank/non blank cells
    By Supraman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-14-2012, 06:21 AM
  6. Counting non blank cells based on several conditions
    By el1212 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-28-2010, 01:48 PM
  7. Nested IF statement 3 conditions 3 outcomes
    By Nick_in_Dubai in forum Excel General
    Replies: 1
    Last Post: 03-12-2009, 04:38 AM

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