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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!