A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Dates and if statements



 
 
Thread Tools Display Modes
  #1  
Old June 19th 12, 04:06 PM
Jade Summers Jade Summers is offline
Junior Member
 
First recorded activity by ExcelBanter: Jun 2012
Posts: 13
Default Dates and if statements

Good day!

I have had luck in the past with people helping me with my issue on this fourm so I am hoping someone here can help me with this I am sure obvious answer.

I am creating a database at work for expiry of various programs/courses. I have got that conditional formatting down but I am struggling to make D2 (if pers has course) change to yes, No, or expired depending on the dates. I have got it to say yes, and expired but the "No" part when no date is inserted in column E.

The following is the current IF function I am using in D2:

=IF(E4<=TODAY(),"Expired",IF(E4>=TODAY(),"Yes"))

I see the issue, but I just am not sure how to use multiple IF's, never works for me.

Any help would be greatly appriciated!
Ads
  #2  
Old June 19th 12, 08:48 PM posted to microsoft.public.excel.misc
Claus Busch
external usenet poster
 
Posts: 1,010
Default Dates and if statements

Hi Jade,

Am Tue, 19 Jun 2012 15:06:59 +0000 schrieb Jade Summers:

> I am creating a database at work for expiry of various programs/courses.
> I have got that conditional formatting down but I am struggling to make
> D2 (if pers has course) change to yes, No, or expired depending on the
> dates. I have got it to say yes, and expired but the "No" part when no
> date is inserted in column E.


try:
=IF(E4=0,"No",IF(E4<=TODAY(),"Expired","Yes"))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3  
Old June 19th 12, 11:16 PM
Spencer101 Spencer101 is offline
Senior Member
 
First recorded activity by ExcelBanter: Mar 2012
Posts: 658
Default

Quote:
Originally Posted by Jade Summers View Post
Good day!

I have had luck in the past with people helping me with my issue on this fourm so I am hoping someone here can help me with this I am sure obvious answer.

I am creating a database at work for expiry of various programs/courses. I have got that conditional formatting down but I am struggling to make D2 (if pers has course) change to yes, No, or expired depending on the dates. I have got it to say yes, and expired but the "No" part when no date is inserted in column E.

The following is the current IF function I am using in D2:

=IF(E4<=TODAY(),"Expired",IF(E4>=TODAY(),"Yes"))

I see the issue, but I just am not sure how to use multiple IF's, never works for me.

Any help would be greatly appriciated!
Hi,

How about:

=IF(E4="","No",IF(E4<=TODAY(),"Expired",IF(E4>TODA Y(),"Yes")))

One thing I will mention is in your original formula you should get rid of one of the equals. If you say <=today in one statement then >=today in the next, there is some overlap and today's date could theoretically appear in either statement. I've taken the last equals out in my suggested formula above as due to the order the second one would be ignored anyway.

Let me know how this works for you.

S.

Last edited by Spencer101 : June 19th 12 at 11:18 PM.
  #4  
Old June 20th 12, 01:11 PM
Jade Summers Jade Summers is offline
Junior Member
 
First recorded activity by ExcelBanter: Jun 2012
Posts: 13
Default

Quote:
Originally Posted by Spencer101 View Post
Hi,

How about:

=IF(E4="","No",IF(E4<=TODAY(),"Expired",IF(E4>TODA Y(),"Yes")))

One thing I will mention is in your original formula you should get rid of one of the equals. If you say <=today in one statement then >=today in the next, there is some overlap and today's date could theoretically appear in either statement. I've taken the last equals out in my suggested formula above as due to the order the second one would be ignored anyway.

Let me know how this works for you.

S.
It worked!

Thank you both so much for replying so quickly, and for the suggestions. I think my database is finally ready and my sanity is still intact, with your help of course
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statements with Dates Excel_Headache Excel Discussion (Misc queries) 5 May 2nd 07 11:42 PM
If Statements with Dates Erika Excel Discussion (Misc queries) 6 March 29th 07 11:28 AM
If statements and Dates Sue New Users to Excel 4 April 21st 06 05:02 PM
Dates in IF statements ScottEslick Excel Discussion (Misc queries) 8 January 20th 06 12:49 AM
if statements & dates? Lynn Excel Worksheet Functions 1 September 19th 05 04:19 PM


All times are GMT +1. The time now is 12:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.