put the thousands separator on a value

112 views
Skip to first unread message

Sébastien Desgrouas

unread,
Sep 21, 2022, 8:13:14 AM9/21/22
to Google Apps Script Community
Hello, 

 I want to put the thousands separator in a variable. Currently, for example, my value is 3325. 
I want the result to be €3 325. Do you know a technique? 
Thank you in advance 
Cordially

Andrew Roberts

unread,
Sep 21, 2022, 2:14:35 PM9/21/22
to google-apps-sc...@googlegroups.com
Change the spreadsheet Settings (File > Settings) to whatever European country you are in, and then select it from Format > Number > Custom currency.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/eb3052e4-4e62-4085-a723-7cecf01b2a7en%40googlegroups.com.

Sébastien Desgrouas

unread,
Sep 22, 2022, 4:47:13 AM9/22/22
to Google Apps Script Community
Hello, I just tested. And it doesn't work. To go into more detail, I have fields with values ​​like this (cf. capture.PNG).

I get the result with this formula champ12,Feuille1.getRange(lignecontrat,14).getValue().
But instead of having 3 325 €, I have 3 325.

I was able to concatenate the € symbol with the value. But I don't see how a space if the value is 3500, and put a space between 3 and 5.
Thank you in advance
Cordially

Capture.PNG
Reply all
Reply to author
Forward
0 new messages