Bruce Kieffer Posted April 7, 2020 Share Posted April 7, 2020 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. Quote Link to comment
Pat Stanford Posted April 7, 2020 Share Posted April 7, 2020 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. Quote Link to comment
Bruce Kieffer Posted April 7, 2020 Author Share Posted April 7, 2020 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. Quote Link to comment
Pat Stanford Posted April 7, 2020 Share Posted April 7, 2020 Glad to help. Ask again as needed. Stay healthy. 🙂 Quote Link to comment
J P Posted January 9 Share Posted January 9 @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! Quote Link to comment
Pat Stanford Posted January 9 Share Posted January 9 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. Quote Link to comment
J P Posted January 9 Share Posted January 9 @Pat Stanford Hello Pat, I am not sure why either since I am using the formula I got from somewhere else! I would love to know if there is more efficient way of writing formula for such purpose. Please see attached below. Thank you so much again! WS sample.vwx Quote Link to comment
Pat Stanford Posted January 10 Share Posted January 10 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. 1 Quote Link to comment
Recommended Posts
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.