Jump to content

Round worksheet cells to nearest 1/4?


Recommended Posts

I asked something similar to this about 6 months ago. @Pat Stanford explained to me that the thicknesses in my worksheet that I think to be 3/4" are actually slightly different than 3/4", and that is the case here. Instead of being exactly 3/4" some are .750000000000001, so when I summarize a column in my worksheet, those not exact and those that are exact appear as ---. How do I round them so they all appear as 3/4" in the worksheet? Without any luck, I tried all the worksheet cell number formatting options, and I tried changing the Units settings and using Dimension as the numbering format for those cells.

 

Column E is the thickness. When column A is not summarized, then they all appear as 3/4".

Screenshot2024-01-07at3_03_56PM.thumb.png.50eca687d21319a19b2b98c66c78ba59.png

 

When column A (or column G) are summarized, then the thicknesses (column E) are all ---.

Screenshot2024-01-07at3_06_25PM.thumb.png.4c63893ef65bc6dcd3f18dbefbae8be7.png

Link to comment

You can't do it with display formatting. You actually need to round or truncate the values to make them the same.

 

Try

 

=Truncate(Min(Height, Length, Width), 2)

 

The last digit in the formula is the number of decimal places.  2 is fine for 1/2 and 1/4 increments.  You will need to go to 3 for 1/8 and 4 for 1/16.

 

Link to comment

@Bruce Kieffer  For anyone but you I would recommend just faking it. 😉

 

=Truncate(Min(Height+.005, Length+.005, Width+.005), 2)

 

Adding the extra 5 thousandths of an inch before truncating will make the Truncate act more like a Round.  Anything with a digit in the thousandths place of 0, 1, 2, 3, 4 will end up with a value of 9 or less and will be ignored during the truncation. A digit tin the thousandths place of 5, 6, 7, 8, 9 will exceed 10 and will carry into the hundredths place and will truncate to the higher value.

 

It would be interesting to see what all those values are without the Truncate and see just how far off they are.

 

Link to comment
Posted (edited)
3 hours ago, Pat Stanford said:

@Bruce Kieffer  For anyone but you I would recommend just faking it. 😉

 

=Truncate(Min(Height+.005, Length+.005, Width+.005), 2)

 

Adding the extra 5 thousandths of an inch before truncating will make the Truncate act more like a Round.  Anything with a digit in the thousandths place of 0, 1, 2, 3, 4 will end up with a value of 9 or less and will be ignored during the truncation. A digit tin the thousandths place of 5, 6, 7, 8, 9 will exceed 10 and will carry into the hundredths place and will truncate to the higher value.

 

It would be interesting to see what all those values are without the Truncate and see just how far off they are.

 

LOL! @Pat Stanford you know me too well. Sure I know they are 3/4" thick, but I want to understand what Vectorworks is doing, and you know that too!. I fixed all the pieces so there's no need for modification to the formula anymore. I do appreciate learning about the truncate formula, which I may use if the future.

Edited by Bruce Kieffer
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...