Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to write a formula to set the Font Style?

Does anyone know how to write a formula to set the Font Style based on the
text language under specific cells?

For example, in cell A1, there is some english text, then I would like to
use the font "Arial" with size 8. However, if there is some chinese text in
cell A1, then I would like to use font "XYZ" with size 15.
Does anyone have any suggestions on how to write a formula to determine the
text in order to set the text styles?
Thank you for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default How to write a formula to set the Font Style?


I think it's not Easy.

there is no such property of language ID for a cell's value.

However, you could add some code on Worksheet_SelectionChange event to
capture any change in cells then check for cell's value in the sheet.

if it is a text then to check whether the first letter belong to A-Z, use
select case will be a good idea. if it is a chinese, it will return "?" but
you cannot use ? as a identifier. then you perform formatting in the
ActiveCell.format property.

hope this help.

by the way, are you in HK?

Leung









"Eric" wrote:

Does anyone know how to write a formula to set the Font Style based on the
text language under specific cells?

For example, in cell A1, there is some english text, then I would like to
use the font "Arial" with size 8. However, if there is some chinese text in
cell A1, then I would like to use font "XYZ" with size 15.
Does anyone have any suggestions on how to write a formula to determine the
text in order to set the text styles?
Thank you for any suggestions
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to write a formula to set the Font Style?

Thank you for your reply
Could you please give me any example on how to do it?
Yes, I am in HK
Thank you for your suggestions
Eric

"Leung" wrote:


I think it's not Easy.

there is no such property of language ID for a cell's value.

However, you could add some code on Worksheet_SelectionChange event to
capture any change in cells then check for cell's value in the sheet.

if it is a text then to check whether the first letter belong to A-Z, use
select case will be a good idea. if it is a chinese, it will return "?" but
you cannot use ? as a identifier. then you perform formatting in the
ActiveCell.format property.

hope this help.

by the way, are you in HK?

Leung









"Eric" wrote:

Does anyone know how to write a formula to set the Font Style based on the
text language under specific cells?

For example, in cell A1, there is some english text, then I would like to
use the font "Arial" with size 8. However, if there is some chinese text in
cell A1, then I would like to use font "XYZ" with size 15.
Does anyone have any suggestions on how to write a formula to determine the
text in order to set the text styles?
Thank you for any suggestions
Eric

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
Form CheckBox font size / style tikchye_oldLearner57 Excel Discussion (Misc queries) 2 March 15th 07 01:34 AM
can a1 reference style and r1c1 style be used in same formula? rjagga Excel Worksheet Functions 1 September 17th 06 10:58 AM
font style of worksheet functions gvm Excel Worksheet Functions 4 January 20th 06 08:30 PM
how do i get font style back on toolbar? melissa Excel Discussion (Misc queries) 2 July 18th 05 08:55 PM
Icon button - font/style cvgairport Excel Discussion (Misc queries) 1 December 2nd 04 12:51 AM


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