Convert fractions to decimals
I'm looking for a formula that I can use to convert (15 1/4 to 15.25) or (15 1/16 to 15.0625)
Best Answer
-
It is possible. We can leverage the "/" to pull the character(s) from the left and divide by the character(s) on the right (after converting each to a numerical value).
To get the left side:
=VALUE(LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row) - 1))
To pull the right is a little "out of the box" thinking:
=VALUE(SUBSTITUTE([Width Fraction]@row, LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row)), ""))
Divide left by right, and you should be good to go:
=VALUE(LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row) - 1)) / VALUE(SUBSTITUTE([Width Fraction]@row, LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row)), ""))
Answers
-
How is it displayed in the cell?
If you are looking to manually enter everything, it would look something along the line of
=15 + 1 / 4
or
=15 + 1 / 16
-
I am using a beta form in the field to enter cabinet door sizes and am wanting to convert to a decimal in order to calculate sq ft. I was able to do it long hand but was hoping there was a way that when then entered 1/16 it would automatically convert it when added to my sheet.
-
It is possible. We can leverage the "/" to pull the character(s) from the left and divide by the character(s) on the right (after converting each to a numerical value).
To get the left side:
=VALUE(LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row) - 1))
To pull the right is a little "out of the box" thinking:
=VALUE(SUBSTITUTE([Width Fraction]@row, LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row)), ""))
Divide left by right, and you should be good to go:
=VALUE(LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row) - 1)) / VALUE(SUBSTITUTE([Width Fraction]@row, LEFT([Width Fraction]@row, FIND("/", [Width Fraction]@row)), ""))
-
i ended up creating an index/match to another sheet. where it gets a bit hairy is when I have mixed number.
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!