I have a spreadsheet with two tabs, "Service Requests" and "CC".
Service requests have multiple lines of various customers and info. CC is a blank form that I want to fill out based on the active line in Service Requests I have named ranges in the CC tab.
I have this working fine in Excel, what I'm used to , but need it to work in sheets. I'm new to App Scripts.
This is what I have so far just trying to get one cell to copy but doesn't work.
``` function FillOutForm(){
``` var spreadsheetDocument = SpreadsheetApp.getActive();
``` var SR = spreadsheetDocument.getSheetByName('Service Requests');
``` var CC = spreadsheetDocument.getSheetByName('CC')();
``` var rangeToCopy = SR.getActiveRange();
``` rangeToCopy.copyTo(CC.getRange('Name'));
``` }
The named ranges I have on CC are Address, Date, Name, Notes, Phone, Town, WifiName, WifiPassword
I'd like to fill these out from the activecell on service requests and then each cell offset to the right of the activecell for the other fields.
Thanks