This one was fun.
I didn't go with the macro route. I just made the assumption that the prime number would occur within 11 plus or minus the given number. I then add a row for each number below that set of numbers and find the ones where the module is 0 only once. Then to find the closest, I take the difference between that list and the given number and keep only the lowest difference.
P.S. the community page isn't letting me post the .yxwz file so I had to export it before attaching to this post.