Converting measures with fraction
Hi all,
I am having a hard time to se a formula that converts this measure format 10' - 4 1/2" to Feet without fraction. The trick part is one of my parameter wont have the fraction "10' - 9"".
Could I please have some help.
Thanks a lot.
Bruno Gazire
Answers
-
I used helper columns to split out the numbers. For a reason I do not yet understand, I could not get the Inches to appear as value in the main formula column named Inches but needed to add an additional helper column to turn that number from text to value.
Feet: =VALUE(LEFT(Measure@row, FIND("'", Measure@row) - 1))
Inches:
=IF(CONTAINS("/", Measure@row) = "TRUE", VALUE(MID(Measure@row + " ", FIND("~", SUBSTITUTE(Measure@row + " ", " ", "~", 2)) + 1, FIND("~", SUBSTITUTE(Measure@row + " ", " ", "~", 3)) - FIND("~", SUBSTITUTE(Measure@row + " ", " ", "~", 2)) - 1)), MID(Measure@row, FIND("- ", Measure@row) + 1, LEN(Measure@row) - FIND("- ", Measure@row) - 1))
(When I added "Value" to the false portion of the if statement above, it returns Invalid)
[Credit goes to @Leibel S to find text between spaces. https://community.smartsheet.com/discussion/98219/how-do-i-return-text-from-text-string-with-the-space-as-a-delimiter]
Inches Value: =VALUE(Inches@row)
Fraction: =IF(CONTAINS("/", Measure@row) = "TRUE", VALUE(MID(Measure@row, FIND("/", Measure@row) - 1, 1)) / VALUE(MID(Measure@row, FIND("/", Measure@row) + 1, 1)), 0)
I hope these work for you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!