Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

A Script that Allows a Checkbox to Recognise a Value via Formula and Copy to Another Cell

$
0
0



Is it possible for:

  • a set of checkboxes to recognise lists (grouped in one cell) on entry (via formula)
  • to then have the same checkboxes copy the list to another cell as it returns "TRUE"

Currently the below is entered in Scripts though only does the latter.
I am hoping to find a solution that allows the checkboxes to do both.

function onEdit(e) {  const sheet = e.range.getSheet();  if (sheet.getName() !== 'Sheet1' || e.range.columnStart < 3 || e.range.columnEnd > 3 || !String(e.value).match(/^(true)$/i)) {    return;  }  const valueToCopy = sheet.getRange(e.range.rowStart, 2).getValue();  const targetRange = sheet.getRange(e.range.rowStart, e.range.columnStart + 5);  targetRange.setValue(valueToCopy);}

Please see the Sample Sheet attached for a more detailed explanation.


Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>