79541634

Date: 2025-03-28 14:06:22
Score: 1.5
Natty:
Report link

This apps script allows to replace the , to | only if you set the advance option in data validation like below

function onEdit(e) {
  const sh = e.value.replace(/,\s/g,"|");
  if(e.range.getDataValidation())
  {
    var list = String(sh).split('|');
    var uniq = [...new Set(list)];
    e.range.clear();
    e.range.setValue(uniq.join("|"));
  }
}

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Saravanan Velappan