adding formula

M

Majid

Chris has helped me to write this formula. It seems OR is not responding.
Is there anthing wrong with this formula. Also I am not sure why we are
adding 1,2 at the end of the formuls. What I want to happen is to add any
date to either finish 1 column or start 10 column then the other dates are
printed on the other fileds.
(ProjDateSub(Finish1,2320) OR ProjDateSub(Start10,1440))

This would also have to be a part of a bigger formula e.g.

iif((ProjDateSub(Finish1,2320) OR ProjDateSub(Start10,1440)),1,2)
Please advise
Majid
 
C

Chris Marriott

Hi Majid

The formula I gave you is an example it sets out to demonstrate 2 points

1. when you use an AND statement or an OR statement between two conditions
you must encapsulate the two conditions within parentheses

2. my example set to show that there has to be a bigger picture e.g. at the
minimum if the criteria is met what happens, and in this case if neither
crtiteria are met what happens...

The example remains good....

http://www.microsoft.com/downloads/...40-147b-447a-b0d3-6088673a53a4&DisplayLang=en

The above link gives more information on this

Alternatively I would recommend

http://www.amazon.com/gp/product/09...7?v=glance&n=283155&n=507846&s=books&v=glance

As an excellent reference for your formula requirements


--
Regards


Chris Marriott - PMP MCSE MCDBA
UK - EPM Consultant & Trainer
 
D

Dale Howard [MVP]

Chris --

Thank you for your kind recommendation of our Project Server 2003 book! :)
 
M

Majid

Hi Chris,
I am about to buy both books. One thing I want to clarify is that it seems
the book is focusing on server 2003 which I do not have at this time. I am
using project 2002 professionsl version. Please advise Thank you Majid
 
J

JackD

Post the formula you have (exactly) and tell us what you want to do.
It should be possible to work it out, but to do this I need to know what you
have and what you are trying to do.
 
M

Majid

Hello Jack, I am sorry not being able to get back to you earliear
Here is the formula
(ProjDateSub(Finish1,960) OR ProjDateSub(Start10,1440))
I have 3 coulmns (Finish 2) and (Finish 1) and (Start 10). What I want to
do is to formulate Finish 2 column so, when I add date to either Finish 1 or
Start 10 then Fininsh 2 column date to be written automatically which is
subtracting 960.
i.e. when I add Dec. 9 on finish 1 the Finish 2 is printed a date
automatically which is 2 days prior to Finish 1 which is Dec 7
I hope this help
I have also orderd the book
Thanks for you help
Majd
 
J

JackD

That is your problem. What does that formula mean? OR is used to do a
boolean comparison. This means you need true/false type values on both sides
of the OR.
If you know you are either going to have a value in Finish1 or in Start10
(but not in both) then replace the OR with an &
If you think you will have values in both, then you need some sort of logic
to decide what to do. I'd use an iif statement.
 
M

Majid

Hello JackD
For Now I would like to have vlaue in either of the columns not both. As
per your advice i changed OR to AND and it is not working. Here is the
formula,
(ProjDateSub(Finish1,920) AND ProjDateSub(Start10,1440))
Your help on this is greatly appreciated
Majid
 
J

JackD

I said to change the OR to "&" (the ampersand symbol, NOT the word "AND")

"&" will concatenate the two. If both are blank then the result will be
blank. In formulas every character must be exact.

If you have values in both, which one do you want to show? Without that it
is impossible to write a formula for it. When you decide what you want to
show post back. It is a simple matter of writing an IIF statement.
 
M

Majid

Hello Jack
There are two columns (Finish1 and Start10)
If there is no vlaue in both columns the results is blank ( in Finish7)
If there is value in both then I want the earliest date in either column to
be subtracted from
I hope I explained well
Thank you in advance
Majid
 
J

JackD

Here is the basic structure of the formula:

IIf([Start10]<[Finish],[Start10],[Finish])

Replace the 2nd and 3rd arguments of the iif statement with whatever result
you want to see - your date subtraction formulas for example - I did not put
them in because I don't want to have to debug them.

The logic goes like this.
If the value in start10 is less than the finish show the value of start10,
otherwise show the finish.
Since an "NA" value in start10 is evaluated to be 2^32-1 a blank value will
always be greater than finish. Finish always has a value so you don't need
to worry about it.
 
M

Majid

Hello JackD
I thank you again for your help. It is working. I have added project date
add fuction and it is perfectly fine
Bythe way, I purchased both books by Gary and Dale and hopefully it is a
good reference in future.
Have a good weekend
Majid

JackD said:
Here is the basic structure of the formula:

IIf([Start10]<[Finish],[Start10],[Finish])

Replace the 2nd and 3rd arguments of the iif statement with whatever result
you want to see - your date subtraction formulas for example - I did not put
them in because I don't want to have to debug them.

The logic goes like this.
If the value in start10 is less than the finish show the value of start10,
otherwise show the finish.
Since an "NA" value in start10 is evaluated to be 2^32-1 a blank value will
always be greater than finish. Finish always has a value so you don't need
to worry about it.

--
-Jack ... For Microsoft Project information and macro examples visit
http://masamiki.com/project
or http://zo-d.com/blog/index.html
..
Majid said:
Hello Jack
There are two columns (Finish1 and Start10)
If there is no vlaue in both columns the results is blank ( in Finish7)
If there is value in both then I want the earliest date in either column to
be subtracted from
I hope I explained well
Thank you in advance
Majid
 

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

Similar Threads


Top