Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default fraction udf

Howdee all.
I know that we can do basic fractions with alt+ specific keystrokes, such as
alt+0188 gives 1/4, or alt+0189 gives one half.

I've recently learned that by using code in vba we can get certain fraction
characters.
E.g. chrW(H8135) gives one third.

However, here I'm interested in getting more choices on fractions.
In my specific case, I'd like the fraction 1/6, in "normal" appearing
fraction form as we see for 1/4 or 1/2.

Has anyone ever been able to make a UDF that does a larger variety of
fractions?

Thank you.
Best.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default fraction udf

On May 11, 4:00*am, Steve wrote:
Howdee all.
I know that we can do basic fractions with alt+ specific keystrokes, such as
alt+0188 gives 1/4, or alt+0189 gives one half.

I've recently learned that by using code in vba we can get certain fraction
characters.
E.g. chrW(H8135) gives one third.

However, here I'm interested in getting more choices on fractions.
In my specific case, I'd like the fraction 1/6, in "normal" appearing
fraction form as we see for 1/4 or 1/2.

Has anyone ever been able to make a UDF that does a larger variety of
fractions?

Thank you.
Best.


sorry if my post is not you wantd.

but for displaying only you can use "0/0" code in custom number format.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default fraction udf

Steve,

that's not a problem of an UDF.
Try to select different fonts and you'll see that it works only with
some fonts, not all.
As you should know any character used on a computer is stored
as a number.
In the font file the data for the "picture" is stored and the operating
system is just drawing this "picture" associated with the character
code onto the screen.

Start-up charmap.exe and look at the differences between the fonts.
You'll see that some fonts contain more different characters than
others and - as is the case with Windings - same character codes
show different signs.

To get more fraction characters you have to select a font that contains
these characters or create your own font - no trivial task.

Helmut.

"Steve" schrieb im Newsbeitrag
...
Howdee all.
I know that we can do basic fractions with alt+ specific keystrokes, such as
alt+0188 gives 1/4, or alt+0189 gives one half.

I've recently learned that by using code in vba we can get certain fraction
characters.
E.g. chrW(H8135) gives one third.

However, here I'm interested in getting more choices on fractions.
In my specific case, I'd like the fraction 1/6, in "normal" appearing
fraction form as we see for 1/4 or 1/2.

Has anyone ever been able to make a UDF that does a larger variety of
fractions?

Thank you.
Best.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default fraction udf

Good morning Helmut.
Thank you for your response.
Well, I've gone through the character map, and found one that'd work, with
the exception of one thing. I cannot locate any other option of inserting
it-- while I have a great memory, trying to remember character map each time
I'd need it would be the key.

In this case, it's Calabri font, with a U+2159 Vulgar, unicode. Unicode is
the key withthis one. The default option does not work.

I then remembered that I have code to create all of the 10000 chrW
characters in a spreadsheet. But of course I still had to work through the
various fonts.
I finally found enough variations with the MS Specialty Reference font
that'd meet the need.
It appears that the MS Specialty Reference font repeats identical numbers
multiple times throughout the 10k characters.

Thanks for youre help.
Best.

"Helmut Meukel" wrote:

Steve,

that's not a problem of an UDF.
Try to select different fonts and you'll see that it works only with
some fonts, not all.
As you should know any character used on a computer is stored
as a number.
In the font file the data for the "picture" is stored and the operating
system is just drawing this "picture" associated with the character
code onto the screen.

Start-up charmap.exe and look at the differences between the fonts.
You'll see that some fonts contain more different characters than
others and - as is the case with Windings - same character codes
show different signs.

To get more fraction characters you have to select a font that contains
these characters or create your own font - no trivial task.

Helmut.

"Steve" schrieb im Newsbeitrag
...
Howdee all.
I know that we can do basic fractions with alt+ specific keystrokes, such as
alt+0188 gives 1/4, or alt+0189 gives one half.

I've recently learned that by using code in vba we can get certain fraction
characters.
E.g. chrW(H8135) gives one third.

However, here I'm interested in getting more choices on fractions.
In my specific case, I'd like the fraction 1/6, in "normal" appearing
fraction form as we see for 1/4 or 1/2.

Has anyone ever been able to make a UDF that does a larger variety of
fractions?

Thank you.
Best.



.

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
Show fraction as fraction even if answer is 1 Vin Sukhadia Charts and Charting in Excel 1 December 2nd 09 07:51 PM
fraction of itself Darljm Excel Discussion (Misc queries) 2 June 17th 08 01:07 AM
Text fraction to fraction format brownti via OfficeKB.com Excel Worksheet Functions 1 February 1st 08 02:38 PM
How do I change fraction to fraction characters? cmcqueary2806 Excel Worksheet Functions 1 November 2nd 06 09:58 PM
Whole Fraction MWH Excel Programming 5 September 1st 05 04:46 AM


All times are GMT +1. The time now is 04:31 PM.

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"