Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default fractions in forms & cells (not DATES & Decimals)

How can I guaranteed that fractions ("5/16" etc) are displayed rather than
dates or decimals in my user forms, Excel cells, and Word bookmarks?

I have tried many things, including formating the Excel cells (Format
Cells...), using Format(data,"# ??/??"), using Application.Text(Cstr(data),
"##/##"), .Numberformat = "# ??/??" and I still have problems.

What I find is that I keep getting Decimals or Dates instead of fractions.
The problem happens both in Excel Cells and when the data in those cells is
transfered to forms generated via Word VBA.

I've resorted to formating everything as text, but that seems to be a poor
solution given Excel's ability to deal with fractions.

Thanks for any tips,
-Tony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default fractions in forms & cells (not DATES & Decimals)

Tony,
Using this:

With Range("A1")
.Value = 0.5
.NumberFormat = "# ??/16"
MsgBox .Text
End With

I see "8/16".

NickHK

"T_o_n_y" wrote in message
...
How can I guaranteed that fractions ("5/16" etc) are displayed rather than
dates or decimals in my user forms, Excel cells, and Word bookmarks?

I have tried many things, including formating the Excel cells (Format
Cells...), using Format(data,"# ??/??"), using

Application.Text(Cstr(data),
"##/##"), .Numberformat = "# ??/??" and I still have problems.

What I find is that I keep getting Decimals or Dates instead of fractions.
The problem happens both in Excel Cells and when the data in those cells

is
transfered to forms generated via Word VBA.

I've resorted to formating everything as text, but that seems to be a poor
solution given Excel's ability to deal with fractions.

Thanks for any tips,
-Tony



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fractions displayed in cells, Why not in user forms? T_o_n_y Excel Programming 3 June 27th 06 01:17 PM
fractions and decimals! AmyTaylor Excel Worksheet Functions 4 April 6th 06 12:20 AM
converting decimals to fractions jason2444 Excel Discussion (Misc queries) 1 January 20th 06 11:07 PM
converting decimals to fractions jason2444 Excel Discussion (Misc queries) 1 January 20th 06 01:58 AM
Fractions to Decimals problem nickravo Excel Discussion (Misc queries) 1 March 7th 05 10:34 AM


All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"