Round off a Value in Microsoft Project to a Whole Number

Posted on 2009-05-27
Medium Priority
Last Modified: 2013-11-15
I have the below formula, and I would like it to round to the nearest whole number.  Formatting won't work either, as I want to use the number a another formula too.  This is in a custom number field.

IIf([Number3]>[Number2],0,IIf([Number2]<1 Or [Number3]<1,0,([Number3]/[Number2])*100))

I tried this, but it didn't work:

Rnd(IIf([Number3]>[Number2],0,IIf([Number2]<1 Or [Number3]<1,0,([Number3]/[Number2])*100)))

How can I do this a simple as possible?

Thanks, Jon
Question by:Jon Bredensteiner
  • 4
  • 2

Author Comment

by:Jon Bredensteiner
ID: 24488203
I found the below code at the following link, but I cannot make it work...

Format([Duration]/480,"0") & " day" & IIf([Duration]/480>1.5,"s","")


Author Comment

by:Jon Bredensteiner
ID: 24495862
I found a workaround...  I converted the number to text, and used a Left function to remove the decimals:

Left([Number4],2) & "%"

However, I would still like to know if there is a way to round a number to the nearest whole number, as it could be useful some day.  Any suggestions???
LVL 15

Expert Comment

ID: 24502836

I think you have hit another one that Project does not do. There is no Round function for Project that I am aware of. The RND function you used actually exists but it is for generating a RANDOM number. Project by design tries to give specific and accurate data so rounding kind of goes against the design.

I understand the thought though and as long as you dont need to use the values in other calculations the text conversion should be fine to get your display as you need.

You could use the INT function but it doesn't truly round. It will always go to the last complete whole number so anything from 10.01 to 10.99 would revert to 10.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Author Comment

by:Jon Bredensteiner
ID: 24503409
What about using Left([Number4],2) to convert it to text, and then using some other function to change it back to a number?
LVL 15

Accepted Solution

dbase118 earned 2000 total points
ID: 24503538

If your Left([Number4],2) & "%" is simply removing decimals then it in fact is doing the same thing the INT function would do except the INT would return as a numeric value.

So your original long formula would go in [Number4] then Number5 could be INT([Number4]).

You can use the CInt function to convert text to an Integer but you essentially end up with the same answer as you would get by simply using the INT function directly.

Author Closing Comment

by:Jon Bredensteiner
ID: 31586018
Thank you very much for your help.

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Re-planning is just as important as planning. MS Project files need to be updated regularly to reflect the current status of the project and to streamline the upcoming tasks. We have seen a lot of issues where project managers have not updated the p…
Article by: x-men
Where used to see Gantt charts for illustrating project timelines, but what if I wanted to visualize passed timed events? Here's how.
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question