It would probably take less time and be more useful in the long run to learn the basics of Python scripting. You've already got the code, so read some of the tutorials and the ArcGIS Help to learn how to tidy it up and even turn it into a script tool (usable from ArcToolbox and in ModelBuilder) if you so desired.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.