Encapsulate text list with single quotes and commas for use in queries

One feature I desperately miss from Redgate SQL Prompt with SSMS is the very easy process of encapsulating a list in single quotes and commas. I could paste a list directly out of excel into the editor, highlight the list and hit a couple of hotkeys to encapsulate and use them in an “IN” statement in SQL.

I wrote an Excel function to do this - hope it helps. If added to your personal macro file, it’ll be available to all spreadsheets.
csvRange.zip (22.4 KB)