Skip to main content
deleted 4 characters in body
Source Link

You might use

  • SpreadsheetApp.getActiveSheet() to get the active sheet
  • SpreadsheetApp.getSheetByName(sheetName) to get a sheet by name
  • SpreadsheetApp.getUi().prompt(...) to ask the user the FROM / TO as well custom dialogs and sidebars.

You might have to start by reading https://developers.google.com/apps-script/guides/sheets and https://developers.google.com/apps-script/guides/sheets/macros. Briefly,

  • Google Apps Script use JavaScript as programming language.
  • The only way to assign a script to a keyboard shortcut is by using the Google Sheets Macros feature but they are complex (Ctrl+Alt+Shift+Number).

Please be aware that:

  • Using images over the grid as buttons might not be very reliable as they could be easily deleted or moved from their position.
  • Scripts created by the Google Sheets macro recorder isare based on "active" sheets and ranges which makes the code hard to adapt and to perform very poorly (it'sthey're very slow and requiresrequire that the user keeps their "hands" away from the the spreadsheet while the macro is running.
  • Macros can be executed from the Macros menu
  • Scripts could be imported as macros. This might be handy to avoid having to create a custom menu and having to use the Macro recorder.

Considering the above,

  1. it might be better to use menu options than keyboard shortcuts and buttons
  2. if you are able to create a Macro close to what you need you might find worthy to improve your JavaScript knowledge just enough to be able to improve and adapt the recorded macro to fit your needs (or ask more specific questions about using scripts in Google Sheets.)

You might use

  • SpreadsheetApp.getActiveSheet() to get the active sheet
  • SpreadsheetApp.getSheetByName(sheetName) to get a sheet by name
  • SpreadsheetApp.getUi().prompt(...) to ask the user the FROM / TO as well custom dialogs and sidebars.

You might have to start by reading https://developers.google.com/apps-script/guides/sheets and https://developers.google.com/apps-script/guides/sheets/macros. Briefly,

  • Google Apps Script use JavaScript as programming language.
  • The only way to assign a script to a keyboard shortcut is by using the Google Sheets Macros feature but they are complex (Ctrl+Alt+Shift+Number).

Please be aware that:

  • Using images over the grid as buttons might not be very reliable as they could be easily deleted or moved from their position.
  • Scripts created by the Google Sheets macro recorder is based on "active" sheets and ranges which makes the code hard to adapt and to perform very poorly (it's very slow and requires that the user keeps their "hands" away from the the spreadsheet while the macro is running.
  • Macros can be executed from the Macros menu
  • Scripts could be imported as macros. This might be handy to avoid having to create a custom menu and having to use the Macro recorder.

Considering the above,

  1. it might be better to use menu options than keyboard shortcuts and buttons
  2. if you are able to create a Macro close to what you need you might find worthy to improve your JavaScript knowledge just enough to be able to improve and adapt the recorded macro to fit your needs (or ask more specific questions about using scripts in Google Sheets.)

You might use

  • SpreadsheetApp.getActiveSheet() to get the active sheet
  • SpreadsheetApp.getSheetByName(sheetName) to get a sheet by name
  • SpreadsheetApp.getUi().prompt(...) to ask the user the FROM / TO as well custom dialogs and sidebars.

You might have to start by reading https://developers.google.com/apps-script/guides/sheets and https://developers.google.com/apps-script/guides/sheets/macros. Briefly,

  • Google Apps Script use JavaScript as programming language.
  • The only way to assign a script to a keyboard shortcut is by using the Google Sheets Macros feature but they are complex (Ctrl+Alt+Shift+Number).

Please be aware that:

  • Using images over the grid as buttons might not be very reliable as they could be easily deleted or moved from their position.
  • Scripts created by the Google Sheets macro recorder are based on "active" sheets and ranges which makes the code hard to adapt and perform very poorly (they're very slow and require that the user keeps their "hands" away from the spreadsheet while the macro is running.
  • Macros can be executed from the Macros menu
  • Scripts could be imported as macros. This might be handy to avoid having to create a custom menu and having to use the Macro recorder.

Considering the above,

  1. it might be better to use menu options than keyboard shortcuts and buttons
  2. if you are able to create a Macro close to what you need you might find worthy to improve your JavaScript knowledge just enough to be able to improve and adapt the recorded macro to fit your needs (or ask more specific questions about using scripts in Google Sheets.)
Source Link

You might use

  • SpreadsheetApp.getActiveSheet() to get the active sheet
  • SpreadsheetApp.getSheetByName(sheetName) to get a sheet by name
  • SpreadsheetApp.getUi().prompt(...) to ask the user the FROM / TO as well custom dialogs and sidebars.

You might have to start by reading https://developers.google.com/apps-script/guides/sheets and https://developers.google.com/apps-script/guides/sheets/macros. Briefly,

  • Google Apps Script use JavaScript as programming language.
  • The only way to assign a script to a keyboard shortcut is by using the Google Sheets Macros feature but they are complex (Ctrl+Alt+Shift+Number).

Please be aware that:

  • Using images over the grid as buttons might not be very reliable as they could be easily deleted or moved from their position.
  • Scripts created by the Google Sheets macro recorder is based on "active" sheets and ranges which makes the code hard to adapt and to perform very poorly (it's very slow and requires that the user keeps their "hands" away from the the spreadsheet while the macro is running.
  • Macros can be executed from the Macros menu
  • Scripts could be imported as macros. This might be handy to avoid having to create a custom menu and having to use the Macro recorder.

Considering the above,

  1. it might be better to use menu options than keyboard shortcuts and buttons
  2. if you are able to create a Macro close to what you need you might find worthy to improve your JavaScript knowledge just enough to be able to improve and adapt the recorded macro to fit your needs (or ask more specific questions about using scripts in Google Sheets.)