Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Converting number from Millions to Lakhs format

Return to Member Forum

  • Author
    Posts
    • #94478

      I want to convert the numbers used in Millions format to Lakhs

      example: 333,333,333,333 to 3,33,33,33,33,333

      I want to convert the same in running text and tables also.

      Please help

    • #94491

      Surely a Grep Master on this forum! …

      (^/)

    • #94503
      David Blatner
      Keymaster

      Wow, I never realized that Lakhs were written in such a different form! What are the rules? Always 3 at the right end? Then groups of 2?

      • #94535
        Masood Ahmad
        Participant

        Yes David, that’s the standard. The Units, Tens and Hundreds go together. Then Thousand and Ten Thousands, then Lakh and Ten Lakhs, then Crore and Ten Crores and so on…

    • #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.

    • #94515
      Masood Ahmad
      Participant

      Four GREPs not threee…

      …and this might not work properly in Tables, check that as well.

    • #94517

      Just a [friendly] comment: the script doesn’t work at all in Tables!

      (^/)

      • #94522
        Masood Ahmad
        Participant

        Yes, I know that’s why I mentioned it in my reply above. Atleast the non-table can be formatted (I hope).

        There are much talented persons on this forum, might be someone will come up with something. Till then use the above code.

    • #94524

      Yeap! There are many qualified persons as members of this forum like Peter, Jongware, Keith, David, …

      (^/)

    • #94565

      Just for comment!

      https://en.wikipedia.org/wiki/Lakh

      Interesting matter!

      Masood is right trying to use a script!
      I’ve written mine that works on texts and tables, all the document or just a text selection (that can include tables) and doesn’t treat again what is already done!!
      … Including an “Undo!”, just … Fast and Cool! ;-)

      I think it’s interesting for all to know that this question can be fixed using Grep and Javascript power! By me or other guys.
      Personally, as already said on this forum (and elsewhere), I don’t work for free!

      (^/)

    • #94566

      Thanks every one for your valuable support.

      @ Masood Ahmed your Script was really helpful for text thanks a lot.

      @ Obi-wan Kenobi your script is really valuable for me.

      Can you please let me know the cost of the same.

      • #94571
        Masood Ahmad
        Participant

        Thanks Tanvir for your nice words, that’s more than a million euros :) I’m glad it worked for you.

        Initially I was not sure whether this can be achieved. You need ideas to get you started and to keep you going.

        Let me know if I could be of any help for FREE!

    • #94570

      Just €30.

      (^/)

Viewing 9 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads