View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
leung leung is offline
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