Skip to main content
2 votes
Accepted

Recorded a Macro to Import a File in Google Sheets

The Google Sheets macro recorder writes a JavaScript function using Google Apps Script classes. Only some Google Sheets user interface commands are available on Google Apps Script. File > Import is ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

Macro to return 1 + the value of the cell above

Macro /** @OnlyCurrentDoc */ function myFunction() { const cell = SpreadsheetApp.getActive().getCurrentCell(); cell.setValue(cell.offset(-1, 0).getValue()+1); cell.offset(0, 1).activate(); } ...
Blindspots's user avatar
  • 6,196
1 vote

Google apps script or formula to solve convert to proper case, with exceptions

This approach uses REGEXTRACT and SUBSTITUTE and handles both use cases =BYROW(FILTER(A:A,LEN(A:A)), LAMBDA(r, LET(rxA,"^", rxB,"see also ", rxC,"([[:upper:]]{3,}(?:\s&...
Blindspots's user avatar
  • 6,196
1 vote

Google apps script or formula to solve convert to proper case, with exceptions

The question specifies google-apps-script, but this is probably easier to solve with a plain vanilla spreadsheet formula, like this: =let( paths, A2:A, mark, "(see also ", first_, ...
doubleunary's user avatar
  • 15.1k
1 vote
Accepted

Timed Triggers for Macros on Multiple Sheets in a Spread Sheet

Your code is designed to work only on the active sheet spreadsheet.getActiveSheet(). You need a way to activate and loop through each individual sheet. You can get a list of sheets in your ...
Blindspots's user avatar
  • 6,196
1 vote

Move row to very bottom of sheet (Google Sheets Apps Script)

"moveRows/insertRowAfter/deleteRows" Dance My first reaction was that Jacktose was wrong and I wrote this to prove it. But as Jacktose comments - this is merely the "dance". I was ...
Tedinoz's user avatar
  • 5,751
1 vote
Accepted

Possible to make a Google sheet macro available to all sheets I access?

Technically speaking it's not easy to make a macro available to all the spreadsheets. It's possible to create an add-on to make available a Google Apps Script project to all the spreadsheet but at ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

How to emulate behavior or cmd + down arrow in Google Sheets Macros?

Use getNextDataCell(), like this: const spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getCurrentCell() .getNextDataCell(SpreadsheetApp.Direction.DOWN) .offset(1, 0) .activate(...
doubleunary's user avatar
  • 15.1k
1 vote
Accepted

Solver in Google Sheets Macros

Short answer: No because Google Sheets hasn't a built-in Solver feature and because macros can't be used to automate features added by add-on. As an Excel user that knows about Excel's macros that is ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

How to enable macros

In Google Sheets macros only works for editors, not for viewers. Regarding saying no to the authorization request, the way to show the authorization again when it was previously denied, is by running ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

Google sheets macro to run on worksheet change

See Tanaike's gist "Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script". You may also want to take a look at the jumpToToday_ script ...
doubleunary's user avatar
  • 15.1k
1 vote

Add one Column to Another, Then Delete the Column

Use this map-reduce pattern to calculate the row-by-row sum: function replaceColumnsWithRowSum() { const ss = SpreadsheetApp.getActive(); const sourceRange = ss.getRange('Sheet1!C3:D246'); const ...
doubleunary's user avatar
  • 15.1k
1 vote

How to select and remove drawing object in macro

You want to copy a spreadsheet template by clicking a button, and then delete the button in the newly copied spreadsheet. You are using a macro to copy the spreadsheet. A macro is a Google Apps Script ...
Tedinoz's user avatar
  • 5,751
1 vote
Accepted

How can I make an attendance table that automatically deletes obsolete day and creates a new?

The following is offered on the basis that there are usually many ways to solve a problem. This is just one approach. There are three elements to the resolution of this question: 1 - update the data ...
Tedinoz's user avatar
  • 5,751
1 vote

How can I avoid being prompted to authorize macro-enabled spreadsheets from trusted users?

No. There is no way to disable it for new documents. Macros provide users with no programming experience an easy way to extend Sheets functionality but the authorization dialog they trigger is ...
Rubén - Volunteer Moderator -'s user avatar
1 vote
Accepted

Is it safe to use macros I created in Google's web apps?

If the macro is created by you then it is totally safe. The warning is general eg. it doesn't differentiate if the macro was created by you or by someone else. The whole procedure is just safety ...
user0's user avatar
  • 26.8k

Only top scored, non community-wiki answers of a minimum length are eligible