Results 1 to 2 of 2
2003-04-29, 12:40 #1
- Join Date
- Jun 2001
- Bethlehem, Pennsylvania, USA
- Thanked 0 Times in 0 Posts
NA in date field (MS Project 2000)
I am attempting to create an IIF statement in a custimized text field. I am using the [Date1] field in the expression where [Date1] may have a date entry or not. IF it does not the [Date1] field has NA put in the field The formula I am using is
IIF([Date1] is NA, do something, do something else)
I get errors with this formula.
How do you handle a NA in a date field when you want to use this in a formula?
2003-04-29, 15:10 #2
- Join Date
- Aug 2001
- Frederick, Maryland, USA
- Thanked 2 Times in 2 Posts
Re: NA in date field (MS Project 2000)
The issue at hand is that the Date1 field is treated as a Date field. When you don't enter a date, the field is written as NA. Testing for = NA or is null or other tests will give you the #Error. I can't remember how to test against this to make it work.
A workaround is to go to Tools, Customize Fields, select the text field you are using, select the Value List and set the default to some silly field such as 12/25/1988. (Dont forget to unrestrict the field) You can then test against the field you set as the default to get your test to work instead of testing against NA.
(It's been a while!)