Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Show fraction as fraction even if answer is 1 | Charts and Charting in Excel | |||
fraction of itself | Excel Discussion (Misc queries) | |||
Text fraction to fraction format | Excel Worksheet Functions | |||
How do I change fraction to fraction characters? | Excel Worksheet Functions | |||
Whole Fraction | Excel Programming |