date specified If statement

T

tulsas1

hello
my client wants a stoplight for tasks passed a specific date. I kno
how to build stoplights' however, I can not get my formula to work. I'v
never written a formula in Project that defines a specific date. Thi
is my statement I have in a text field that I want to assign a stopligh
to. The formula runs, but I get incorrect results. In other words,
get tasks with a finish date of 6/19/09 as Yes when the result should b
No. Any assistance is appreciated

IIf([Finish]>, "5/21/10","YES","NO"
 
J

Jan De Messemaeker

Sorry, misread :-(
Project gets lost between date and text fields
Use Cdate("5/21/10") and it works
HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
Jan De Messemaeker said:
Hi,

Sorry but 6/21/10 IS > 5/19/9 so the result should be yes.
HTH

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
tulsas1 said:
hello
my client wants a stoplight for tasks passed a specific date. I know
how to build stoplights' however, I can not get my formula to work. I've
never written a formula in Project that defines a specific date. This
is my statement I have in a text field that I want to assign a stoplight
to. The formula runs, but I get incorrect results. In other words, I
get tasks with a finish date of 6/19/09 as Yes when the result should be
No. Any assistance is appreciated

IIf([Finish]>, "5/21/10","YES","NO")


--
tulsas1
------------------------------------------------------------------------
tulsas1's Profile: http://forums.techarena.in/members/163063.htm
View this thread:
http://forums.techarena.in/microsoft-project/1282753.htm

http://forums.techarena.in
 
T

tulsas1

still not working. new formula is

IIf(CDATE([Finish])>"5/21/10","YES","NO")

I have Finish dates of 9/29/09 that have a "Yes" value. Something is
confusing Project but I can't seem to locate it.
 
J

Jim Aksel

IIf(CDATE([Finish])>CDATE("5/21/2010"),"YES","NO")
Note m
--
If this post was helpful, please consider rating it.

Jim Aksel, MVP

Check out my blog for more information:m/dd/yyyy *4 digit year* and CDATE on
either side of the test. Project returns [Finish] as type Variant and you
have it in a text field ... so 5/21/2010 gets it all confused as well. So,
just convert them both to dates and all is well. This tests fine in P2007
and P2010.

http://www.msprojectblog.com
 
J

Jim Aksel

That's odd, my post truncated.

Note I used a 4 digit year yyyy and converted to date on both sides of the
operator.
Project returns [Finish] as type Variant not Date. Similarly since you are
using a Text field, Project returns your "date" as type String. Both of
these confuse Project so I used CDATE on both sides of the equation to demand
it compare them as dates.

This tests out fine in P2007 and P2010.
--
If this post was helpful, please consider rating it.

Jim Aksel, MVP

Check out my blog for more information:
http://www.msprojectblog.com
 
J

Jan De Messemaeker

Hi,

It's a bit curious that you don't apply my advice, then claim it doesn't
work
Finish is a date alright but "5/21/10" is a string and has to be converted
using the Cdate function.

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 
M

Michael.Tarnowski

hello
my client wants a stoplight for tasks passed a specific date.  I know
how to build stoplights' however, I can not get my formula to work. I've
never written a formula in Project that defines a specific date.  This
is my statement I have in a text field that I want to assign a stoplight
to.  The formula runs, but I get incorrect results.  In other words, I
get tasks with a finish date of 6/19/09 as Yes when the result should be
No. Any assistance is appreciated

IIf([Finish]>, "5/21/10","YES","NO")

--
tulsas1
------------------------------------------------------------------------
tulsas1's Profile:http://forums.techarena.in/members/163063.htm
View this thread:http://forums.techarena.in/microsoft-project/1282753.htm

http://forums.techarena.in

Hi tulsas1,
to implement a reporting schedule status task indicator have a look
at:

* http://www.pptspaces.com/msprojectreporterblog/Lists/Posts/Post.aspx?ID=39
* FAQ 31: http://www.mvps.org/project/faqs.htm
+ Different coloured Gantt bars:
http://pmotechniques.wordpress.com/2008/02/12/different-colored-gantt-bars-in-ms-project-–-how-to/
* Status Stoplights with MS Project (easy to implement):
http://www.projectperfect.com.au/info_stoplights_in_microsoft_project.php
* http://groups.google.com/group/microsoft.public.project/t/bfb3442bee22d848
* http://groups.google.com/group/microsoft.public.project/t/1804206f3b4be6c1

(Maybe some links will be truncated).
HTH, cheers Michael
 
T

tulsas1

thanks Jim.

Jan De Messemaeker, it's not a bid odd, I just misread having to use
CDate before and after.
 

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