# Re: Formula for converting decimals to fractions

Solved
911 0
cancel
Showing results for
Did you mean:
7 - App Architect

I thought I was being clever but my formula did not work. Cells are blank. Why?

SWITCH(
{Decimal},
"0.75",
"3/4",

"0.50",
"1/2"
)
1 Solution

Accepted Solutions
6 - Interface Innovator

If your field {Decimal} is a numeric rather than text field you should put 0.75 not "0.75" etc.

3 Replies 3
6 - Interface Innovator

If your field {Decimal} is a numeric rather than text field you should put 0.75 not "0.75" etc.

18 - Pluto

Is your {Decimal} field type a number, formula, or text? In addition to following John’s advice about using a number in your switch, if your field is a formula, the formula results might not be exact values to match your switch. You might need to do some rounding in your formula or you might want to consider nested IFs.

7 - App Architect

My {Decimal} field is indeed a number and, therefore, removing the quotation marks worked like a charm. Thanks, John_B2, for the solution. And thanks, kuovonne, for sharing suggestions in case the field wasn't a number. I really appreciate the help! 🙂