Reply To: Converting number from Millions to Lakhs format

Home Page / Forums / General InDesign Topics (CLOSED) / Converting number from Millions to Lakhs format / Reply To: Converting number from Millions to Lakhs format

#94508
Masood Ahmad
Participant

Tanvir,

I tried couple of GREPS and came to a conclusion, that this cannot be achieved with one Code. Therefore, I clubbed all the three codes to create one JavaScript, you can download the same from here. I’m not sure, this will work for you however, I checked it with some dummy numbers and it worked at my end.

https://www.dropbox.com/s/c473rbn9wvg07ho/Millions2Lakhs.jsx?dl=0

Further the three GREP codes, I have used are listed below:

Run these in the order given below

1) GREP Find/Change:
Find What: (\d),(\d)
Change to: $1$2

2) GREP Find/Change:
Find What: (\d\d\d)(?=\D)
Change to: ,$0

3) GREP Find/Change:
Find What: \d(?=(\d\d)+\D)
Change to: $0,

4) GREP Find/Change:
Find What: (\d),(\d\d)(?![\d,])
Change to: $1$2

Please let me know if it works.

PS: As a precaution, please make a copy of your original document.

This article was last modified on May 11, 2017

Comments (0)

Loading comments...