  philfna Premium join:2003-12-30 Wisconsin
·TDS
| Another excel question
Everyone was so hopeful with my last question. I have another...
How do I display a decimal as a fraction with a numerator of one? (I use fractions as a way to display ratios. I am trying to show a ratio of 1 to X, or as it would be displayed, 1/X.) |
|
  AlphaOne I see Premium join:2004-02-21
| If you're just interested in text:
Where column A has the value for the divisor.
--
something incredible is waiting to be known - Carl Sagan |
|
  AlphaOne I see Premium join:2004-02-21 | Or this:
=IF(A1="","",CONCATENATE("1/",A1)) --
something incredible is waiting to be known - Carl Sagan |
|
  pog Premium join:2004-06-03 Kihei, HI
·Hawaiian Telcom
| reply to philfna You could also enter custom formatting:
1\/#
From the menu, click format|cells and enter this into the "type" field. I use an old version of Excel here so your version's GUI layout may be different.
Note, the value of the cell is unchanged... it still equals your X -- My Site |
|
  philfna Premium join:2003-12-30 Wisconsin | I was actually for the number not just the formatting...thanks for trying  |
|
  AlphaOne I see Premium join:2004-02-21 | Did my solution work? |
|
 efrem
join:2002-04-03 Westport, CT
| reply to philfna
said by philfna :I was actually for the number not just the formatting...thanks for trying :-) If I understand your request (and that's a real if), how about this:
So if you have 0.75 in Cell A1 and that formula in Cell B1, then Cell B1 will display 1 / 1.33 .
Does that give you both the number AND the format you want? |
|
  H2OuUp2 Happy to be here Premium join:2002-03-15 Oklahoma City, OK 1 edit | reply to philfna Sorry, didn't see the 1/ part  -- He is no fool who gives up what he cannot keep, to gain what he cannot lose. - Jim Elliot |
|
  philfna Premium join:2003-12-30 Wisconsin | reply to philfna True, but none of the selections offer the default to display the numerator as one. They only dictate how many digits in the denominator. |
|
  philfna Premium join:2003-12-30 Wisconsin | reply to philfna efrem that did it thanks a lot! |
|
  AlphaOne I see Premium join:2004-02-21
| Lol. I misunderstood the problem and tried something else:
=IF(A1="","",CONCATENATE("1/",ROUND((1/(MOD(A1,1))),2))) It turned out the result is the same as efrem 's. His is much simpler though! :)
--
something incredible is waiting to be known - Carl Sagan |
|
  H2OuUp2 Happy to be here Premium join:2002-03-15 Oklahoma City, OK
·Cox HSI
| reply to philfna I took it you were wanting to enter .75 in a cell and want 1/1.33 to display in the cell, correct?
If you want to enter .75 in one cell, and have 1/1.33 display in another cell, then either version will work. If you want it to appear in the cell you typed in I believe you will need to use VBA to accomplish the task. -- He is no fool who gives up what he cannot keep, to gain what he cannot lose. - Jim Elliot |
|