Just in case you can't get the code working, here is a formula that will display the last row containing data in column D: =AGGREGATE(14,6,ROW(D:D)/(D:D<>""),1)
=AGGREGATE(14,6,ROW(D:D)/(D:D<>""),1)