You are here:

Excel/Custom Function for Character Convertion


QUESTION: Dear Gulshan,
I Need to build a Custom Function that will look into a cell content and then convert the characters of that cell from the internal mapping.

For Example:

If Cell A1 has "K kha ga" then function convert(A1) will return ক খ গ

of course i will do an internal mapping for K kha ga with your advice

it could be
Case K is ক
Case kha is খ

or could be an excel range like vlookup operation.

Can this be done?

Warm Regards,

ANSWER: Dear Sami,

I think I can guess your requirement, you're trying to do some kind of translation using macros.
Before I start answering, I need a few clarifications:
1. Will each cell have only one character or more than one characters?
2. If each cell has more than one character, like a word or sentence, then do you want to lookup and replace one character at a time or the whole word or sentences?
3. How do you want to handle combines characters like Ksha, Pra etc.

Depending on your answers, you can either look for a formula or a macro based solution. Or if it gets too complicated, look online for some basic free translation tools.

Hope this helps,

---------- FOLLOW-UP ----------

QUESTION: Hey Gulshan,
Thanks for your query.

A cell mostly will have joined letters like words. I understand the complexity, but it will be a unique work for any languistic text analatycal fields once done via vba function.

Note: I will be using it for Arabic to Buckwalter Transformation


Thanks for the clarification Sami.
We can try to make this work together. Please send me the following data to start with:
1. A sample string of Arabic Text
2. Buckwalter transliteration of that sample text
3. A look up / mapping chart which shows all the arabic characters and their corresponding results.

I did a quick search and you may be able to find some online tools doing this job, however, if you still want to continue, please provide me the above data and we can try to work on it.

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts




I can answer questions related to the following topics: 1. MS Excel - Creating and Linking Formulae, Running Pivot Tables, Vlookup etc. 2. Macros / VBA - Creating Macros to do specific jobs. Importing / Exporting / Validating Data in excel through Macros.


I've been working on excel for over 10 years and on VBA macros for over 3 years now.

Bachelor of Commerce, Chartered Accountant from The Institute of Chartered Accountants of India

©2016 All rights reserved.