I am not the most techy person but have been messing around with google sheets and trying to automate a certain task at work. I am currently trying to create a button that would take the fields that has information listed and to have it automatically create notes. I know how to do this for simple sentences on google sheets but I wanted to create different buttons for different scenarios. I have recorded the macro and have the pop-up button listed but I am having issue of the formula coming through as the information on the pop up.
This is the script I have written on AppScript:
function NotActiveTest() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange(‘A2’).activate();
spreadsheet.getCurrentCell().setValue(‘123456’);
spreadsheet.getRange(‘B2’).activate();
spreadsheet.getCurrentCell().setValue(‘name’);
spreadsheet.getRange(‘C2’).activate();
spreadsheet.getCurrentCell().setValue(‘vin’);
spreadsheet.getRange(‘D2’).activate();
spreadsheet.getCurrentCell().setValue(‘ford focus’);
spreadsheet.getRange(‘E2’).activate();
spreadsheet.getCurrentCell().setValue(’36 months 36 miles’);
spreadsheet.getRange(‘F2’).activate();
spreadsheet.getCurrentCell().setValue(’36 months 36k miles’);
spreadsheet.getRange(‘G2’).activate();
spreadsheet.getCurrentCell().setValue(‘company’);
spreadsheet.getRange(‘H2’).activate();
spreadsheet.getCurrentCell().setValue(‘123456789’);
spreadsheet.getRange(‘I2’).activate();
spreadsheet.getCurrentCell().setValue(‘Agent Name’);
spreadsheet.getRange(‘M2’).setValue;
let ui=SpreadsheetApp.getUi()
ui.alert=(“Company called ” & G2 & ” at ” & H2 & ” and verified with agent ” & I2 & “, rep, that ” & B2 & ” the service contract is not active with a correct term of ” & E2 & “”)
};
==
I’ve submitted an image of what the notes look like before hand, and I’m just wanting the pop up to have the information on J2.
enter image description here
Thank you in advance for any help 🙂
I tried to copy and paste the formula in google sheets into App Scripts but its just taking the text of it and not the actual formula. I am really new to this and have zero experience.
Skeletonin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.