Yes, I had been trying hard. Have now found where the error was. I used $A$4 instead of $D$5 and it now works.

Thanks again! You have taught me very well! Much appreciated!