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

1. ## 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

2. ## 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"))

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

=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

4. ## 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. ## Re: IF statement to include 3 conditions and outcomes based on dates and blank cells

Are you addressing both of us?

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.

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

#### 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