Really wanted to try solving this with an iterative macro, as part of prep for taking the Advanced cert this week. Got there in the end, but not very happy about needing 2 macros - one to look for the closest Prime down from the input # and one for the closest Prime up. Think this could be a lot more elegant, but it does work at least. Thanks!