I need help with a script that changes the currency symbol within specific cells based on user selection. Currently, the script is applied to all cells but I only want it to affect cells C9, C12, and C13. I'm not sure where to make this adjustment in the script. Any guidance would be appreciated!
function udtsymbol () {
const s = SpreadsheetApp.getActiveSheet();
const r = s.getDataRange();
const symb = {"$":"$", "€":"€", "£":"£"};
r.setNumberFormat(symb[s.getRange("C8").getValue()]+"###,##0.00");
I've tried modifying the code by adding ranges or using if statements, but I keep encountering errors as I am not familiar with JavaScript. After researching for hours, I decided to seek assistance here.