Use a comma instead of a period in the spreadsheet.

Nico61400 Posted messages 7 Status Membre -  
 Anonymous user -
Hello,

I manage my accounts with Google Sheets.

When I type a number with a comma, if I use the numeric keypad to type a point, I would like the comma to be considered instead of the point.

How can I do that?

Thank you in advance for your answers.

Best regards,

Nicolas

Configuration: Windows / Chrome 98.0.4758.102

1 réponse

Anonymous user
 
Hello,

First of all, this problem comes from the regional setting of your keyboard.
For Google Sheets to accept the decimal point from the numeric keypad as a decimal separator, you need to:
- Go to File > Spreadsheet settings.
- Then, change the time zone to the United Kingdom.

However, if you don't want to change these settings, you have other solutions:
-You can write everything using the point and then press Ctrl + H to replace all points with commas.
-You can also use a script like the one below:
You must go to Tools > Script editor > Ctrl + S to save it

function onEdit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var Sheet = ss.getActiveSheet();
var Rg = Sheet.getActiveCell();
var virg = e.value;
if (isNaN(virg)){}
else{
var res = virg.replace(".", ",");
Rg.setValue(res);
}
}

To make this script available every time, you can redo the process or, to simplify the procedure, you can create a Sheets template file containing the script, and from which you will make a copy each time; the conversion script will be automatically integrated into the copy.

I hope this helped you.
2