Is there a way to use a custom number format in Google Sheets so that decimal point will be visible only when decimals are present? For instance
9
8,2
10
Is there a newer solution about achieving this without a helper column?
EDIT
While looking for a solution to the original question, a glitch was discovered in the sheet (Link here):
column AJ is formatted with number format 0.#
, as this was obtained running the following Google Apps Script:
function test(){
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var cell = sheet.getRange("AJ7");
Logger.log(cell.getNumberFormat());}
Values appear without decimals, when no decimals are present, however if this format is manually applied, it will show integer values with comma. How can it be? Locale is set to Italy, timezone GMT+1.