Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form CheckBox font size / style | Excel Discussion (Misc queries) | |||
can a1 reference style and r1c1 style be used in same formula? | Excel Worksheet Functions | |||
font style of worksheet functions | Excel Worksheet Functions | |||
how do i get font style back on toolbar? | Excel Discussion (Misc queries) | |||
Icon button - font/style | Excel Discussion (Misc queries) |