Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
why doesn't this work?
format(1.5,"0 ??/??") should return a string "1 1/2", it seems. Instead, it returns "2 ??/??" What am I missing? Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mike,
Apparantly, Format doesn't do fractions, but this does: Application.Text(1.5, "# ??/??") HTH, Bernie MS Excel MVP "Mike Weaver" wrote in message ... why doesn't this work? format(1.5,"0 ??/??") should return a string "1 1/2", it seems. Instead, it returns "2 ??/??" What am I missing? Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
not sure the "text" answer allows math
why not just format cell as fraction : Selection.NumberFormat = "# ??/??" "Bernie Deitrick" wrote: Mike, Apparantly, Format doesn't do fractions, but this does: Application.Text(1.5, "# ??/??") HTH, Bernie MS Excel MVP "Mike Weaver" wrote in message ... why doesn't this work? format(1.5,"0 ??/??") should return a string "1 1/2", it seems. Instead, it returns "2 ??/??" What am I missing? Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The worksheet function TEXT takes a number and returns a formatted text string.
Selection.Numberformat would work fine, if the variable were actually being stored in the spreadsheet and not manipulated in VBA. HTH, Bernie MS Excel MVP "Vacation's Over" wrote in message ... not sure the "text" answer allows math why not just format cell as fraction : Selection.NumberFormat = "# ??/??" "Bernie Deitrick" wrote: Mike, Apparantly, Format doesn't do fractions, but this does: Application.Text(1.5, "# ??/??") HTH, Bernie MS Excel MVP "Mike Weaver" wrote in message ... why doesn't this work? format(1.5,"0 ??/??") should return a string "1 1/2", it seems. Instead, it returns "2 ??/??" What am I missing? Thanks in advance |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! That is exactly what I needed.
Mike "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Mike, Apparantly, Format doesn't do fractions, but this does: Application.Text(1.5, "# ??/??") HTH, Bernie MS Excel MVP "Mike Weaver" wrote in message ... why doesn't this work? format(1.5,"0 ??/??") should return a string "1 1/2", it seems. Instead, it returns "2 ??/??" What am I missing? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text fraction to fraction format | Excel Worksheet Functions | |||
How to convert fraction format to text format ...... | New Users to Excel | |||
VBA won't format into fraction | Excel Discussion (Misc queries) | |||
fraction format | Excel Discussion (Misc queries) | |||
Improper fraction format? | Excel Worksheet Functions |