You might use
SpreadsheetApp.getActiveSheet()
to get the active sheetSpreadsheetApp.getSheetByName(sheetName)
to get a sheet by nameSpreadsheetApp.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,
- it might be better to use menu options than keyboard shortcuts and buttons
- 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.)