Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Thanked 0 Times in 0 Posts

    Conditional Format based on Language Contained

    Is it possible to conditionally format a cell (like adding shading) based on whether that cell contains text in a certain language (like Chinese or French)?


  2. #2
    5 Star Lounger
    Join Date
    Jan 2004
    Thanked 128 Times in 112 Posts
    I think not

    Many languages share words, and many far-eastern languages share scripts - indeed the same Kanji character can mean the same thing in, say, Chinese and Japanese (or indeed something different !!) so it would be impossible to say what the language being used was without additional context.

    If you have longer phrases then you can use Google translate to auto-detect the language, so I suppose that in theory you could write code to pick that up but it would be very difficult to execute. Someone may already have done this - I found a website but, frustratingly, couldn't open it !!free-...ogle-translate

    If the range of words is small then I suppose you could make a look-up table of words and languages and format according to that . . . .
    Last edited by MartinM; 2013-12-30 at 07:05.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Pittsburgh, Pennsylvania, USA
    Thanked 342 Times in 335 Posts
    Conditionally formatting is triggered by a TRUE / FALSE either in an excel formula or from some user-defined function. The problem I see is finding creating the function to see if the text contains a certain language.

    How would Excel know about a particular language? Are the phrases in a list? is it formatted differently, should you look through all the words to see that at least one (or some number) are not in the english dictionary?

    Last edited by RetiredGeek; 2013-12-30 at 07:50.

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Newcazzle, UK
    Thanked 643 Times in 611 Posts

    I have an Excel workbook that allows a User to click on a 'language' button to choose a particular language, e.g French, Chinese, Portuguese, English, Spanish etc.
    When a language has been selected, all the worksheet tabs are instantly shown in the selected language, together with data column headings, notes on the sheets etc etc.
    The language selection button simply sets a numeric value in a named cell to indicate which language has been selected.
    (Formulas are then used for displaying the actual language cell contents)

    So, to answer the posters question (sort of), it would be possible to use conditional formatting (in conjunction with the numeric 'language choice' cell) to have say, French headings in one cell colour, Spanish headings in another colour etc etc.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts