In google sheets, I tried to log some information I entered in other sheet to my invoiceLogSheet. but the problem is : when the information log to the sheet, it always log in the last row for entire sheet, and what I want is : to log in last row for specific range of columns (clarify more: to check in specific columns their free last row and log the information on this row)
but I don't know how to script this .. this is the function I used and it does not do the job I want:
function InvoiceLog(invoice_number, part, due_date, totalInvoice, payable_to, project_name, note)
{
//DEFINE ALL ACTIVE SHEETS
var ss = SpreadsheetApp.getActiveSpreadsheet();
//DEFINE INVOICE LOG SHEET
var invoiceLogSheet = ss.getSheetByName("information");
//GET LAST ROW OF INVOICE LOG SHEET
var nextRowInvoice = invoiceLogSheet.getLastRow() + 1;
//POPULATE INVOICE LOG
invoiceLogSheet.getRange(nextRowInvoice, 2).setValue(invoice_number);
invoiceLogSheet.getRange(nextRowInvoice, 3).setValue(part);
invoiceLogSheet.getRange(nextRowInvoice, 4).setValue(due_date);
invoiceLogSheet.getRange(nextRowInvoice, 5).setValue(totalInvoice);
invoiceLogSheet.getRange(nextRowInvoice, 6).setValue(payable_to);
invoiceLogSheet.getRange(nextRowInvoice, 7).setValue(project_name);
invoiceLogSheet.getRange(nextRowInvoice, 8).setValue(note);
}
the columns I want to check the last row in them is (B:H).