Reputation: 83
I've got a Google Form to enter deposits and withdrawals into a Google Sheet and then the ending balance is calculated so the user can balance their check book.
I'm trying to get the most recent balance to display on the Google Form by finding the last row with a balance that is in the 'Ending Balance' column.
It seems a script may be easiest but nothing seems to so what I need. Any advice or direction is appreciated.
Here's the sheet I have set up, it's connected to my form with the headers in row 2. Google Sheet Image
Upvotes: 1
Views: 2508
Reputation: 26796
onFormSubmit
that will fire every time a new form is submittedSample script:
function getMyBalance(){
var sheet=SpreadsheetApp.getActive().getActiveSheet();
var row=sheet.getLastRow();
var column=11;
var balance=sheet.getRange(row, column).getValue();
Logger.log(balance);
}
Upvotes: 1