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 insert 1/3 as fraction

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.





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default got it....

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.

"Steve" wrote:

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.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default insert 1/3 as fraction

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

ChrW(8531)

For example...

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

--
Rick (MVP - Excel)


"Steve" wrote in message
...
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.






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 08:51 PM
how to add 3/4 as a fraction Sean Excel Discussion (Misc queries) 1 November 9th 09 04:05 PM
Text fraction to fraction format brownti via OfficeKB.com Excel Worksheet Functions 1 February 1st 08 03:38 PM
Fraction AlanW Excel Programming 1 October 13th 07 06:00 AM
How do I change fraction to fraction characters? cmcqueary2806 Excel Worksheet Functions 1 November 2nd 06 10:58 PM


All times are GMT +1. The time now is 08:20 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"