insert 1/3 as fraction

S

Steve

Howdee all.
Hope everyone is getting along.

I'm trying to insert a 1/3 character in some code that I'm using for a macro.
While I could easily type one, forward slash, and three, (1 / 3), I'd rather
use the option as in alt + 0188, where I get a ¼ form of the fraction.

I've found the one third fraction in the symbol map, but I see no key
strokes to access it, for entry into the code for my macro.
I.e., on the character map, it shows as U + 2153, Vulgar fraction one third.

So, my question is:

Does anyone know of keystrokes that will allow me to access this character?


Thank you.
 
S

Steve

I found what I was looking for.
Thank you.
turns out if you want to access "fancier" characters, you have to use
chrW(&Hn)
where the n = the vulgar fraction value.
In my case the n = 2153, so I set it to:
chrW(&H2153) and I get one third exactly as I desire.
I'll definitely be testing others in that list too.
Best.
 
R

Rick Rothstein

This will reference the 1/3 character that you want...

ChrW(8531)

For example...

Range("A1").Value = ChrW(8531)
 

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