Test for a cell not being fumulaically populated vs one with data sourced from a dfiferent cell : I have a spreadsheet that auto-populates column B to equal the cells in column A. Column C will be the cell in column A, one row down, but if the cell in column A of the same row and column A of the next row are the same, it wil be column A of two rows down.  Using this formula: =IF(A5=A6,A7,A6).
 
Right now, it prints data in one of the cells when they only contain the formula. I dont understand why.The right column below, which has 2 indigo, 
is an example of the problem, with 'empty' where the cells are not populated, they have a blank pick list. 

red	    red	    orange

orange	orange	yellow

yellow	yellow	green

green	green	blue

blue	blue	0 
  
empty   	    0	    indigo 

empty           0	    indigo 

indigo	indigo	violet

----------------------------
I don't mind the 0 being displayed, but the 3rd column up, right cell, is printing indigo, when it shouldn't be. The columns above that work fine. 
NOTE: The cell in column C, violet, has a slightly different formula, if the
first cell matches the cell below, it sets it to the first data cell in column c, otherwise to the next cell in column A =if(a8=a9,a2,a9)
What I need to see to reduce the risk of human error, is have either a zero, or
nothing displayed in the cell which is showing the first indigo in column c. 