Try
=LOOKUP(2,1/(sheet2!D:D<>""),sheet2!D:D)
Provided, of course, that the user is working in XL2010, or later, as that is when the AGGREGATE function was introduced.Actually, even if the column contains mixed datatypes and the OP wished to return the last non-blank entry, it would still be far better to use e.g.:
=INDEX(Sheet2!D:D,AGGREGATE(14,6,MATCH(CHOOSE({1,2},REPT("z",255),9.9E+307),Sheet2!D:D),1))
than your LOOKUP construction.