=LOOKUP(1,0/(A$1:A1<>""),A$1:A1)