Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. var endRow = SpreadsheetApp.getActiveSheet().getLastRow();
  2. var range = newss.getDataRange();
  3.  
  4. for (var i = 1; i < range.getLastRow() + 1; i++){
  5. var status = newss.getRange(i, 2).getValue();
  6. var rowRange = newss.getRange(i, 1, 1, 5);
  7. if (status == 'Shaman') {
  8. rowRange.setBackgroundColor("#0070DE");
  9. } else if (status == 'Warrior') {
  10. rowRange.setBackgroundColor("#C79C6E");
  11. } else if (status == 'Paladin') {
  12. rowRange.setBackgroundColor("#F58CBA");
  13. } else if (status == 'Hunter') {
  14. rowRange.setBackgroundColor("#ABD473");
  15. } else if (status == 'Rogue') {
  16. rowRange.setBackgroundColor("#FFF569");
  17. } else if (status == 'Priest') {
  18. rowRange.setBackgroundColor("#FFFFFF");
  19. } else if (status == 'Death Knight') {
  20. rowRange.setBackgroundColor("#C41F3B");
  21. } else if (status == 'Mage') {
  22. rowRange.setBackgroundColor("#69CCF0");
  23. } else if (status == 'Warlock') {
  24. rowRange.setBackgroundColor("#9482C9");
  25. } else if (status == 'Monk') {
  26. rowRange.setBackgroundColor("#00FF96");
  27. } else if (status == 'Druid') {
  28. rowRange.setBackgroundColor("#FF7D0A");
  29. } else if (status == '') {
  30. rowRange.setBackgroundColor("#FFFFFF");
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement