If you have a column of data in Excel, it can be converted to a string using TEXTJOIN.
This can be helpful e.g. if you have a script that only takes input in a certain format.
Simply add the data to be converted in column A and then add the following formular in cell B2:
="('" & TEXTJOIN("', '"; TRUE; A2:A1000) & "')"
In the below example, I have a list of IP ranges in column A and these are converted to a string. Single quotes are added around each IP range and the whole string is enclosed in parenthesis. This can be adapted as needed.

No comments:
Post a Comment
Note: Only a member of this blog may post a comment.