Hello everyone! I'm super new to macros and scripts so please bear with me.
Scenario:
a. I have some data on a spreadsheet where the function that I'd like to happen are the ff:
- A save button (image), when clicked, saves the data from specific cells to a new sheet
b. All the next data that will be saved should NOT overwrite the previous row's data (right now, the save button works but when I save it again with a different entry on the cell, the new value overwrites the previous value)
c. The next saved data should move down to the next available row
Right now, this is the only macro script I was able to create (this is literally my first day on Macros!):
function Test1() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('M2').activate();
spreadsheet.getRange('B6').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
spreadsheet.getRange('N2').activate();
spreadsheet.getRange('B7').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
spreadsheet.getRange('O2').activate();
spreadsheet.getRange('B8').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
spreadsheet.getRange('P2').activate();
spreadsheet.getRange('G7').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
}
Any help will be greatly appreciated!
Bookmarks