Hi Paul,
The “Magic” your after is Run Keyword And Return Status which you combine with something like Page Should Contain Element followed by an IF
statement to decide if you should loop around or click the item.
If there is a likelihood that in some future version of your application the item you want might be on page 4 of 4 or 6 of 7, then you might want to put this in a recursive keyword (a keyword that calls itself in the if statement), I gave an example of this here
Hope that helps,
Dave.