# Thread: Rounding to nearest .5 in schedules

1. Login to Give a bone

## Rounding to nearest .5 in schedules

I know you can round to the nearest integer, but can you round to the nearest .5 or something like that?

I have a GPM section in my schedule that is a calculated value, and it gives me the correct numbers. But usually in our schedules we like to round to the nearest half gpm. Is this possible?

Example: A calculated gpm that shows up as 0.3, we want to show up as 0.5

Ive looked around a bit but cant find a good answer.

2. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

A simple formula to use is =round (GPM * 2) / 2

So if you have a number such as 20.3, it will be doubled to 40.6, rounded to 41, and then halved to 20.5

Or if you have 16.14, it's doubled to 32.28, rounded to 32, and halved to 16.

3. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

Ah thank you, that does work. However, some of my GPM's were rounding down to 0. Any GPM below 0 we want to show up as .5. So I had to add an "if" parameter to make that happen. Also, our GPM formula references other fields (like BTU's for example) that are found with a formula, and when you create a field with a formula, you cannot use that field in another formula, you have to re-type that whole formula from the field you want, into your new formula (confusing?). So, we ended up with a massive formula just so we can have our GPM round to the nearest .5

Here is the formula we ended up with in case anyone else has the same situation and needs a reference:

if((((Maximum CFM * Heating Airflow * 1.08 * Delta T air) / (500 * Delta T water) * 2) / 2) < 0.5, 0.5, (round(((Maximum CFM * Heating Airflow * 1.08 * Delta T air) / (500 * Delta T water)) * 2) / 2))

4. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

There are a host of limitations with Revit's formulaic capabilities that cause the inflation in formula length and complexity. But I would not yet call that formula "massive"; see attached pdf, which would be a tiny fraction of the size had we the capabilitity of CONCATENATE...

RevitFormula.pdf

5. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

Bravo! that formula is amazing!

6. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

There are a host of limitations with Revit's formulaic capabilities that cause the inflation in formula length and complexity. But I would not yet call that formula "massive"; see attached pdf, which would be a tiny fraction of the size had we the capabilitity of CONCATENATE...

RevitFormula.pdf
whoa. Please tell me that's the only fixture you guys ever specify.

7. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

Originally Posted by BenSammis
whoa. Please tell me that's the only fixture you guys ever specify.
That would make it too easy, wouldn't it? I've only created these monster formulas for our most commonly specified fixtures. It wasn't as terrible of a task as it appears - I've got a solid method to this. A while ago, I did ask one of my co-workers to make a minor modification to the formula. When he opened the Family and saw that, his left eye twitched and he fell over. I think he's still on the ground over there somewhere...

8. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

Man, if we tried to do that we'd need about 200 of them. And by the time I got all of the formulas entered the model numbers would have changed or been discontinued.

9. Login to Give a bone

## Re: Rounding to nearest .5 in schedules

Wow, bravo. I would hate to miss even one parenthesis in that thing and then have to track down where it belongs.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•