custom field formula question

K

Kris R.

How does one prevent a #ERROR from appearing in a cell, with a formula like
this:

Iif ([Finish] > [Deadline],1,0)

in the cases where a deadline has not been defined for a task?(ie, it is
"NA")

I can't seem to trap the condition when a field is not defined.

IsDate([Deadline]) returns a true, because it's a date field, even if a date
hasn't been defined.

You can't do Iif ([Deadline] = "NA",1,0) because you can't compare a date to
a string.

You can't convert deadline to a string (Str() or Cstr())

I've tried everything I can think of!

How in the heck do you do this??

Thanks,
Kris R.
 
K

Kris R.

BRILLIANT! :)

Just what I needed to know!!

Thanks so much,
Kris R.

JulieS said:
Hi Kris R.
See Jack Dahlgren's site:
http://masamiki.com/project/customfieldFAQ.htm

Hope this helps. Let us know how you get along.
Julie

Kris R. said:
How does one prevent a #ERROR from appearing in a cell, with a formula
like
this:

Iif ([Finish] > [Deadline],1,0)

in the cases where a deadline has not been defined for a task?(ie, it is
"NA")

I can't seem to trap the condition when a field is not defined.

IsDate([Deadline]) returns a true, because it's a date field, even if a
date
hasn't been defined.

You can't do Iif ([Deadline] = "NA",1,0) because you can't compare a date
to
a string.

You can't convert deadline to a string (Str() or Cstr())

I've tried everything I can think of!

How in the heck do you do this??

Thanks,
Kris R.
 
J

JackD

Brian K. has an alternate method that works and is a bit less confusing:

[Baseline Finish]=ProjDateValue("NA")

I've been meaning to add it to my site.
--
-Jack ... For project information and macro examples visit
http://masamiki.com/project

..
JulieS said:
Hi Kris R.
See Jack Dahlgren's site:
http://masamiki.com/project/customfieldFAQ.htm

Hope this helps. Let us know how you get along.
Julie

Kris R. said:
How does one prevent a #ERROR from appearing in a cell, with a formula like
this:

Iif ([Finish] > [Deadline],1,0)

in the cases where a deadline has not been defined for a task?(ie, it is
"NA")

I can't seem to trap the condition when a field is not defined.

IsDate([Deadline]) returns a true, because it's a date field, even if a date
hasn't been defined.

You can't do Iif ([Deadline] = "NA",1,0) because you can't compare a date to
a string.

You can't convert deadline to a string (Str() or Cstr())

I've tried everything I can think of!

How in the heck do you do this??

Thanks,
Kris R.
 
K

Kris R.

Oh, that is EVEN slicker!! That makes more sense, too, that the
ProjDateValue function could handle "NA". That must have been the ONLY
function I DIDN'T try! ;-)

Thanks!
Kris

JackD said:
Brian K. has an alternate method that works and is a bit less confusing:

[Baseline Finish]=ProjDateValue("NA")

I've been meaning to add it to my site.
--
-Jack ... For project information and macro examples visit
http://masamiki.com/project

.
JulieS said:
Hi Kris R.
See Jack Dahlgren's site:
http://masamiki.com/project/customfieldFAQ.htm

Hope this helps. Let us know how you get along.
Julie

Kris R. said:
How does one prevent a #ERROR from appearing in a cell, with a formula like
this:

Iif ([Finish] > [Deadline],1,0)

in the cases where a deadline has not been defined for a task?(ie, it
is
"NA")

I can't seem to trap the condition when a field is not defined.

IsDate([Deadline]) returns a true, because it's a date field, even if a date
hasn't been defined.

You can't do Iif ([Deadline] = "NA",1,0) because you can't compare a date to
a string.

You can't convert deadline to a string (Str() or Cstr())

I've tried everything I can think of!

How in the heck do you do this??

Thanks,
Kris R.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top