Using the change
event of the Spreadsheet may not be the most appropriate option for the described scenario, as it does not allow prevention of the changes made. Nevertheless, I could suggest you to use the select
event instead and if it is needed, apply the validation run-time on the selected cell (range):
// Check here if validation should be applied
"The value should be a number."