title: Identify cells in red
body: <p>The title may be typically simple, but I did not get a solution yet even after researching over several forums on the net.</p>
  
  <p>Let me explain the problem.</p>
  
  <p>I have an excel workbook where few columns uses if conditions that refers other cells. Based on the cell's content, the back color of the cell is defined. For eg. If a cell is blank, it automatically changes to red. These red cells indicates missing information. So I am trying to design a macro to identify these red cells and get the address of each red cell.</p>
  
  <p>For this I used the code for testing, <code>MsgBox IIf(ActiveCell.Interior.ColorIndex = 3, "Yes", "No")</code></p>
  
  <p>But this does not work. The reason is, the macro identifies the color index as -4142 irrespective of what color it is. Whether it is white or blue or red, it still shows -4142.</p>
  
  <p>When I asked this question in a forum, I was redirected to this page.</p>
  
  <p><a href="http://www.cpearson.com/excel/CFColors.htm" rel="nofollow noreferrer">http://www.cpearson.com/excel/CFColors.htm</a></p>
  
  <p>I tested the functions given in that page. It works fine for the sample workbooks I created. But not in the workbook that I am trying to validate.</p>
  
  <p>Could you please help me?</p>