How can I get a greater than function code to work?

Thanks for that Yisrael. I appreciate the feedback.
Paddy