Jump to content

Worksheet Formula Results Displayed In Feet and Inches?


Recommended Posts

Is there a way to format the formula results in a worksheet to show as feet and inches? My formula takes the total inches and divides by 12. The result shows the feet correctly, but the inches it shows is not inches, it's a fraction of a foot. I have tried setting my document units to feet and inches.

 

 

Screen Shot 2020-04-07 at 9.06.14 AM.png

Screen Shot 2020-04-07 at 9.06.42 AM.png

Link to comment

Select the cell in the database header row (2, not 2.1) and set the formatting for that to Dimension.

 

Did you recalculate after setting the units to Feet & Inches. That works here for me.

 

You could also create a formula to generate the string you need. Something like:  =CONCAT(INT(A3), '-', INT(1+(A3-INT(A3))*16), '/16')

 

The problem with that formula is that it will return 4/16 instead of 1/4. And it will always round up to the next largest unit. Change the 16 to whatever base you are interested in.

Link to comment

Thanks again Pat. Got it working now. As you probably guessed, I'm learning worksheets. I have a house project that is a good use for them. Also this exercise is giving me something constructive to do while I'm stuck in the house! 

 

I tested the dimension setup for both feet and inches, and just inches. Both make sense now. I rounded to 1/2" in the inches setup, that's why the numbers are different.

 

 

Screen Shot 2020-04-07 at 10.22.21 AM.png

Screen Shot 2020-04-07 at 10.23.37 AM.png

Link to comment
  • 3 years later...

@Pat Stanford 

 

Hello Pat, 

 

I am working on a dynamic text to display a list of wall components and thicknesses on a Graphic Legend.

However, it seems the components thickness round up and down to nearest 1/2. 

 

The formula I am using for each components is as below:

 

#WS_IF(VALUE(OBJECTDATA('component', 'thickness', 1)>0), 'a.', '')# #WS_COMPONENTTHICKNESS(1)#@#WS_COMPONENTTHICKNESS(1)#>0:' ' @#WS_COMPONENTTHICKNESS(1)#>0:' '  #WS_OBJECTDATA('component', 'name', 1)#

 

Do you know is there anyway to fix this issue? I am attaching the photos below as well. 

 

Thank you! 

Screenshot 2024-01-09 at 12.08.01 PM.png

Screenshot 2024-01-09 at 12.08.14 PM.png

Screenshot 2024-01-09 at 12.08.42 PM.png

Link to comment

Can you send me or post a sample file?

 

I don't understand why you have the Component Thickness (middle section) listed twice.

I am also not sure why you are using the WS_If for part of the formula but then using the Data Tag Trinary (@ : format) for effectively the same thing later in the same function. It would make more sense if you were not using #WS_ for every function.

 

You should be able to include the extra formatting string to force the units and precision where you are showing the unit value, but I need to file to figure it out.

Link to comment

You need to add:

 

#fi_2_1#

 before the first @ in each line like this:

 

#WS_IF(VALUE(OBJECTDATA('component', 'thickness', 1)>0), 'a.', '')# #WS_COMPONENTTHICKNESS(1)##fi_2_1#@#WS_COMPONENTTHICKNESS(1)#>0:' ' @#WS_COMPONENTTHICKNESS(1)#>0:' '  #WS_OBJECTDATA('component', 'name', 1)#

 

This will format the data in the "block" before it to use Feet & Inches and use 2 decimal places of accuracy.  This is enough for 1/4".  If you need 1/8" accuracy you will need to change the 2 to 3.  for 1/6" accuracy you will need to change the 2 to a 4.

 

The way I figured out the string necessary was I added a dummy length to the tag formula and the title block then gave me the option to pick the units and accuracy. After I added it to the tag, I was able to copy and paste it where we needed it.

 

HTH.  Ask again if you need more information.

  • 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...