Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Emily8
 
Posts: n/a
Default Blank field formatted as date

I am trying to use a function to evaluate when a course is due. In column D
there may or may not be a date listed. I'm using this formula in to evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY(),"d ue"," ")

The problem arises when D3 is blank. It is still evaluating the blank cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I thought
the above did.


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Try this

=IF(AND(D3<"",DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))< =TODAY()),"due"," ")

--
HTH

Bob Phillips

"Emily8" wrote in message
...
I am trying to use a function to evaluate when a course is due. In column

D
there may or may not be a date listed. I'm using this formula in to

evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY(),"d ue"," ")

The problem arises when D3 is blank. It is still evaluating the blank

cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I

thought
the above did.




  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 11 Oct 2005 08:46:34 -0700, Emily8
wrote:

I am trying to use a function to evaluate when a course is due. In column D
there may or may not be a date listed. I'm using this formula in to evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY()," due"," ")

The problem arises when D3 is blank. It is still evaluating the blank cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I thought
the above did.


You could do something like:

=IF(ISNUMBER(D3),IF(DATE(YEAR(D3)+3,MONTH(D3),DAY( D3))<=TODAY(),"due",""),"")

By the way, I would advise returning NULL strings rather than, as in your
formula, a <space character.


--ron
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

=if(d3="","",yourformulahere)

But any date 3 years in the future will never be <= today().

I'm not sure what that formula should be.

=if(d3="","",date(year(d3)+3,month(d3),day(d3)))
???


Emily8 wrote:

I am trying to use a function to evaluate when a course is due. In column D
there may or may not be a date listed. I'm using this formula in to evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY(),"d ue"," ")

The problem arises when D3 is blank. It is still evaluating the blank cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I thought
the above did.


--

Dave Peterson
  #5   Report Post  
Emily8
 
Posts: n/a
Default

Thanks Bob, Ron and Dave. It works perfectly with the AND, and I've altered
it to be a null string.

Dave, the admin types in the date the course was taken and then if it is
longer than 3 years ago, it comes up with "due". Not very elegant, but I
just needed to make the formula work! My users weren't very interested in
alternative methods to track this.

Thanks, All!

"Bob Phillips" wrote:

Try this

=IF(AND(D3<"",DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))< =TODAY()),"due"," ")

--
HTH

Bob Phillips

"Emily8" wrote in message
...
I am trying to use a function to evaluate when a course is due. In column

D
there may or may not be a date listed. I'm using this formula in to

evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY(),"d ue"," ")

The problem arises when D3 is blank. It is still evaluating the blank

cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I

thought
the above did.







  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

Ooh. I see. I was (incorrectly) expecting the date in D3 to be more current.
That was a bad assumption!

Emily8 wrote:

Thanks Bob, Ron and Dave. It works perfectly with the AND, and I've altered
it to be a null string.

Dave, the admin types in the date the course was taken and then if it is
longer than 3 years ago, it comes up with "due". Not very elegant, but I
just needed to make the formula work! My users weren't very interested in
alternative methods to track this.

Thanks, All!

"Bob Phillips" wrote:

Try this

=IF(AND(D3<"",DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))< =TODAY()),"due"," ")

--
HTH

Bob Phillips

"Emily8" wrote in message
...
I am trying to use a function to evaluate when a course is due. In column

D
there may or may not be a date listed. I'm using this formula in to

evaluate
if the course is due to be renewed.

=IF(DATE(YEAR(D3)+3,MONTH(D3),DAY(D3))<=TODAY(),"d ue"," ")

The problem arises when D3 is blank. It is still evaluating the blank

cell
as a date, 01/01/1907 and returning "due" because it is less than today.

If D3 is blank I need the formula to return an empty string, which I

thought
the above did.






--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
blank data field shows quote in formula, how to delete it? wdanner Excel Discussion (Misc queries) 2 April 4th 05 08:44 PM
Pivot table will not group a date field Mary Excel Discussion (Misc queries) 2 February 17th 05 02:53 AM
Validating a date field kenelder Excel Discussion (Misc queries) 2 February 16th 05 10:50 PM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


All times are GMT +1. The time now is 06:27 PM.

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

About Us

"It's about Microsoft Excel"