title: Finding a color in a column and getting the data from another column
body: <p>I have an spreadsheet like the following.</p>
  
  <pre><code>      A             B             C
  7- Test                       [red]
  8- Test1                      [yellow]
  9- Test2                      [red] 
  </code></pre>
  
  <p>So, I'm trying to pass a loop in the column C, starting on C7. When it gets the color red, I should be able to get the values from column A, which are Test and Text2.</p>
  
  <p>Here is the related code (it's <strong>not</strong> entering on the if)</p>
  
  <pre><code>SpreadsheetApp.getUi()   
  var s = SpreadsheetApp.getActiveSheet();
  
  var dataCor = s.getRange('C7:C').getBackgrounds();
  Browser.msgBox(dataCor);                      //Here I show the codes from the colors.
  var dataValor = s.getRange('A7:A').getValues();
  Browser.msgBox(dataValor);                   //Here I show the values from the column A.
  
  var list = [];
  var n = 0;
  var n2 = 0;
  
  for(var i = 0; i &lt; dataCor.length; i++)
  {
   n = n + 1;
  
   if(dataCor == '#cc0000') 
   {  
    list[n2] = s.getRange('A7'+n-1).getValue();
    n2++;
   }
  }  
  Browser.msgBox(list);
  </code></pre>
  
  <p>PS: If you guys have any suggestions, please tell me.</p>
  
  <p>PS1: Just to knowledge, is there any function that ignores the weekend days on a math? For example, if I get the date 22 of february, I know that 20 and 21 should be ignored so people would be able to work from 15 to 19. Anyway, it's not related to the topic.</p>