Thanks John.
In the event that a record doesn't contain an image, the ranking result gives a 1. If there are no images, I'd like this value to be blank and for the next record with an image to obtain the next sequential number. Is there any way of adjusting the function to accommodate this...