I use a macro in MSP for planned % in a number field, but i want .

A

armchairandy

I am using a macro which calculates the planned % complete based on the
status date. I am saving the information in a number field as i want to
compare against actual % complete using an indicator field (text fields do
not work). The macro works ok, but will not give a whole number. This causes
problems with comparisons and does not look good. Also is there any way of
transfering the macro to a formula within the field so that it automatically
updates.
 
J

JackD

If you are trying to get an integer. there are a number of ways to do it.
Different ways may be more efficient depending on what the equation is.

One simple way is to use the \ operator instead of /

10/3 = 3.333333
10\3 = 3

An alternative is to use Round

foo = 10/3
foo = Round(foo)
foo is now 3.

There are more.
Yes, you can use a formula instead of a macro.
Insert the column, rightclick on the column header
choose customize.
click on the formula button.
 
A

armchairandy

Thanks Jack I will try that out

JackD said:
If you are trying to get an integer. there are a number of ways to do it.
Different ways may be more efficient depending on what the equation is.

One simple way is to use the \ operator instead of /

10/3 = 3.333333
10\3 = 3

An alternative is to use Round

foo = 10/3
foo = Round(foo)
foo is now 3.

There are more.
Yes, you can use a formula instead of a macro.
Insert the column, rightclick on the column header
choose customize.
click on the formula button.


--
-Jack ... For project information and macro examples visit
http://masamiki.com/project

..
 

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