Fractional formatting

G

Guest

why does a cell return a decimal when text is linked in an "if statement"????
... the format of the cell is set to fractional.

This statement """=IF(G4=0,"",G4&"'' x")""": retuns (a decimal): I.E .375"
x -----
What I need the cell to return is: 3/8" x

if I i re-write it too: =if(G4=0,"",G4): it returns a fraction. I.E 3/8

HELP!!!! :(
 
D

Dave Peterson

If I put:
=if(G4=0,"",G4)
in a cell that has a general format, then I see 0.375 (with =3/8 in G4 and G4
formatted as a fraction).

If I format that cell with the formula as a fraction, then I'll see a fraction.

But your formula is returning text, so the numberformat doesn't really apply.

You could use something like:
=IF(G4=0,"",TEXT(G4,"0/0")&"'' x")
or
=IF(G4=0,"",TEXT(G4,"0/0")&""" x")
(if you want double quotes instead of two apostrophes)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top