Posts

Demo

const SHEET_NAME = "Sheet1"; // तुमच्या Sheet मध्ये: // B = Product Name // C = Section // D = Kg / litre // E = Quantity // G = Last Update const GREEN_COLOR = "#00FF00"; // Green const RED_COLOR = "#FF0000"; // Red // Product मध्ये बदल केल्यावर function onEdit(e) { const sheet = e.range.getSheet(); if (sheet.getName() !== SHEET_NAME) return; const row = e.range.getRow(); const col = e.range.getColumn(); // Header सोडून if (row < 3) return; // फक्त B ते E मध्ये बदल झाल्यास if (col < 2 || col > 5) return; // G मध्ये आजची तारीख sheet.getRange(row, 7) .setValue(new Date()) .setNumberFormat("dd/MM/yyyy"); // A:G Green sheet.getRange(row, 1, 1, 7) .setBackground(GREEN_COLOR); } // Saturday ला सर्व Product Red function saturdayRed() { const sheet = SpreadsheetApp .getActiveSpreadsheet() .getSheetByName(SHEET_NAME); if (!sheet) return; const today = new Date(); // Saturday = 6 if (today.getDay() !== 6) return; const lastRow = sheet.getLastRow(); if (lastRow < 3) return; // A:G Red sheet.getRange(3, 1, lastRow - 2, 7) .setBackground(RED_COLOR); }

Rate This Study Storm

Getting Info...

Post a Comment

Will try to reply you soon
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.