Memuat
Memuat
Google Form to Clean Table for online ads and ROAS
0 views
Google Form answers are processed by the script and land in the Data sheet with price and category from Master. Item names are tidied and totals computed automatically.

Form orders turn straight into clean Data rows.
The real project file is available. It is not just the picture above: you get the working file with every formula in place. It can be downloaded after payment, and we send the download link by WhatsApp or email.
ZIP: .xlsx workbook + Apps Script module (.zip)
| Cell | Formula | What it does |
|---|---|---|
| H11 | =COUNTA(Data!B2:B61) | Rows received. |
| H12 | =COUNTIF(Data!F2:F61,Data!F2) | Rows with the same status as the first row. |
| H13 | =SUMIFS(Data!G:G,Data!A:A,TODAY()) | Total received today. |
| H14 | =IFERROR(INDEX(Data!B2:B61,COUNTA(Data!B2:B61)),"") | Last item received. |
The script is delivered as a separate Code.gs file inside the ZIP. Paste it into Extensions, Apps Script. A short excerpt:
function onFormSubmit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var data = ss.getSheetByName("Data");
var master = ss.getSheetByName("Master").getDataRange().getValues();
var v = e.namedValues;
var item = String(v["Item"][0]).trim();
var qty = Number(v["Qty"][0]) || 0;
var status = data.getRange(2, 6).getValue();
var harga = 0, kategori = "";
for (var i = 1; i < master.length; i++) {
if (String(master[i][0]).toLowerCase() === item.toLowerCase()) {
item = master[i][0]; harga = master[i][1]; kategori = master[i][2];
}
}
if (harga === 0 || qty <= 0) return;
data.appendRow([new Date(), item, kategori, qty, harga, status, ""]);
var r = data.getLastRow();
data.getRange(r, 7).setFormula("=D" + r + "*E" + r);
}
function pasangTriggerForm() {
ScriptApp.newTrigger("onFormSubmit")
.forSpreadsheet(SpreadsheetApp.getActive()).onFormSubmit().create();
}Columns of the Data sheet:
| Ad Campaign | Daily Spend |
|---|---|
| Meta Ads Payday Promo | 1,500,000 |
| Meta Ads Retargeting | 800,000 |
| TikTok Ads Viral Product | 2,000,000 |
| TikTok Spark Ads | 1,200,000 |
| Google Search Brand | 1,000,000 |
| Google Shopping | 1,800,000 |
| Shopee Ads New Product | 600,000 |
| Tokopedia TopAds | 500,000 |
| Influencer Boost | 2,500,000 |
| YouTube Ads Video | 1,500,000 |
The sample data is synthetic.
Yes. The picture above is only a preview. After payment we send the download link of the real project file (a ZIP containing the .xlsx workbook and the macro module) by WhatsApp or email.
No. The sample data is synthetic and only shows how the formulas behave. Replace it with your own data and the formulas keep working.
Yes, as a separate order. Message us on WhatsApp with a short description of your columns and what you want to see.
Sample data is synthetic. Google Sheets is a trademark of Google LLC.
Back to Google Sheets portfolio