fraction udf

S

Steve

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.
 
J

Javed

Howdee all.
I know that we can do basic fractions with alt+ specific keystrokes, suchas
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.
 
H

Helmut Meukel

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.
 
S

Steve

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top