UPDATE: I FIGURED IT OUT.
I'm struggling with some simple copy/paste scripting in Google Sheets. I'm a complete scripting newbie. Advanced at Excel/Sheets.
I have a "Today" data entry sheet. I have a "Program" sheet that stores data in a column under a Date header. I want a macro/script that will:
- cut data from a range on Today
- search the date row in "Program" to Match whatever date is on the "Today" data entry page.
- Finally paste data to a range on Program xx rows down from that identified date in step 2
Essentially I want to INDEX/MATCH in reverse. Rather than return a cell in INDEX/MATCH, I want to copy to a cell.
Simplified Sheet is here with additional notes in the Sheet: https://docs.google.com/spreadsheets/d/1i66I4kI733dTzoYFgsgDLRl4XWhFQc7gI-vAYKfC1Jo/edit?usp=sharing
Below is as far as I've gotten. I can cut/paste from a specific cell to another cell. But need to figure out "var destination" somehow.
function copydata2() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var source = ss.getRange('Today!b11:g11');
source.copyTo(ss.getRange('Program!d11:i11'), {contentsOnly: true});
source.clear();
};