How to adapt this function to exclude a specific cell or how to apply just to one cell?

function onEdit(e) {
  if (typeof e.value != 'object') {

Convert a text of a specific cell ... to UPPERCASE

  • try like this which should upper Sheet1!A2 cell:

function onEdit(e) {
    var sheet, sheetName, colToCapitalize;
    sheet = e.source.getActiveSheet();
    colToCapitalize = 1;
    sheetName = 'Sheet1';
    if (sheet.getName() !== sheetName || e.range.rowStart = 2 || e.range.columnStart !== colToCapitalize || typeof e.value == 'object') return;

  • user0, thanks for your help. But, and if I only want to exclude a specific cell, in the original script? May 22 '19 at 19:24
  • I got this message when saving: Invalid assignment left-hand side. (linha 1, arquivo "macros")Dispensar May 22 '19 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.