Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var endRow = SpreadsheetApp.getActiveSheet().getLastRow();
- var range = newss.getDataRange();
- for (var i = 1; i < range.getLastRow() + 1; i++){
- var status = newss.getRange(i, 2).getValue();
- var rowRange = newss.getRange(i, 1, 1, 5);
- if (status == 'Shaman') {
- rowRange.setBackgroundColor("#0070DE");
- } else if (status == 'Warrior') {
- rowRange.setBackgroundColor("#C79C6E");
- } else if (status == 'Paladin') {
- rowRange.setBackgroundColor("#F58CBA");
- } else if (status == 'Hunter') {
- rowRange.setBackgroundColor("#ABD473");
- } else if (status == 'Rogue') {
- rowRange.setBackgroundColor("#FFF569");
- } else if (status == 'Priest') {
- rowRange.setBackgroundColor("#FFFFFF");
- } else if (status == 'Death Knight') {
- rowRange.setBackgroundColor("#C41F3B");
- } else if (status == 'Mage') {
- rowRange.setBackgroundColor("#69CCF0");
- } else if (status == 'Warlock') {
- rowRange.setBackgroundColor("#9482C9");
- } else if (status == 'Monk') {
- rowRange.setBackgroundColor("#00FF96");
- } else if (status == 'Druid') {
- rowRange.setBackgroundColor("#FF7D0A");
- } else if (status == '') {
- rowRange.setBackgroundColor("#FFFFFF");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement