How do i call a macro from from another macro in google sheets : In google sheets, I have a macro that runs until an IFS statement wants to call another macro when true, but I get an error message instead.


`enter code here`function BeginTournamentMacro() {
 `enter code here` var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  `enter code here`var sheet = spreadsheet.getSheetByName('SIGNUP SHEET').activate();
 `enter code here` var COLUMN = 3;
  `enter code here`var spreadsheet = SpreadsheetApp.getActive();
  `enter code here`spreadsheet.getCurrentCell().offset(3, 3, 50, 3).activate();
  `enter code here`spreadsheet.getActiveRange().copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
  `enter code here`spreadsheet.getCurrentCell().offset(-1,  -1, 48, 4).activate()
  .sort({column: spreadsheet.getActiveRange().getColumn(), ascending: true});
   `enter code here`spreadsheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate();
   `enter code here`spreadsheet.getCurrentCell().offset( 1, 0).activate(); //moves down one row.
   `enter code here`spreadsheet.getCurrentCell().offset(0, 0, 48, 4).activate();
   `enter code here`spreadsheet.getActiveRangeList().clear({contentsOnly: true, skipFilteredRows: true});
   `enter code here`spreadsheet.getActiveRange().If Range('B2').value = 10, Then Call Ten;  
  

I expected the macro named Ten to run, and then return to run the final 2 rows of code (not shown).
Error message: Missing ; before statement. (line 16, file "macros")Dismiss