Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel Function - Date evaluation

I want another cell to evaluate if there is a date (of any kind) in another
cell. If there is then I want the formula to place the date minus 30 days.
If there's not, then I want it to say "NA".

Ex:
Cell A4 can have, "OK", "Overdue", or physically input a date. Cell A5 will
be A4-30, if there is a date. If there is not then A5 will read "NA".

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Excel Function - Date evaluation

First install this UDF:

Function issdate(r As Range) As Boolean
issdate = IsDate(r.Value)
End Function

and then:

=IF(issdate(A4),A4+30,"NA")

--
Gary''s Student - gsnu200796


"bigbird98" wrote:

I want another cell to evaluate if there is a date (of any kind) in another
cell. If there is then I want the formula to place the date minus 30 days.
If there's not, then I want it to say "NA".

Ex:
Cell A4 can have, "OK", "Overdue", or physically input a date. Cell A5 will
be A4-30, if there is a date. If there is not then A5 will read "NA".

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Excel Function - Date evaluation

A date is just a number to Excel, so you could use this in A5:

=IF(ISNUMBER(A4),A4-30,"NA")

However, you could put any number in A4 (like 10) to fool this. A date
of 1st Jan 2008 has a serial value of 39448 (the number of elapsed
days since 1st Jan 1990), so if your dates are meant to be quite
recent you could also check for the value, eg:

=IF(ISNUMBER(A4),IF(A439400,A4-30,"NA"))

Hope this helps.

Pete

On Jul 23, 7:52*pm, bigbird98
wrote:
I want another cell to evaluate if there is a date (of any kind) in another
cell. *If there is then I want the formula to place the date minus 30 days. *
If there's not, then I want it to say "NA".

Ex:
Cell A4 can have, "OK", "Overdue", or physically input a date. *Cell A5 will
be A4-30, if there is a date. *If there is not then A5 will read "NA".

Thanks


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
Electronic Evaluation/Feedback Forms in Excel kza40381 Excel Discussion (Misc queries) 1 February 6th 13 10:07 AM
Continuous Evaluation of Time Function NOW() ?? monir Excel Worksheet Functions 1 March 4th 08 09:40 AM
Vlookup evaluation Mick[_2_] Excel Worksheet Functions 2 February 25th 08 02:22 PM
Automatic evaluation of custom worksheet function Jim Excel Worksheet Functions 1 November 6th 06 10:23 PM
Options Evaluation Michael G. Excel Worksheet Functions 0 January 28th 05 05:41 PM


All times are GMT +1. The time now is 06:42 AM.

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"