Put this formula in cell E2 and copy it down the column: =IF(AND(D2="",C2<>""),C2,IF(AND(D2<>"",C2=""),D2,"NA"))