A1 -if formula
A2 -if formula

A3 =if(A1="",A2,A1)

if not can you give a sample file with your sample output. thanks.