Convert column list to comma separated list with VBA
If the CONCATENATE function is a little tedious for you, you can use a VBA to quickly convert the column list to a list in a cell.
1. Hold ALT button and press F11 on the keyboard to open a Microsoft Visual Basic for Application window.
2. Click Insert > Module, and copy the VBA into the module.
VBA: Convert column list to comma separated list
3. Click Run button or press F5 to run the VBA.
4. A dialog displayed on the screen, and you can select the column list you want to convert. See screenshot:
5. Click OK, then another dialog popped up for you to select a cell. See screenshot:
6. Click OK, and all values in the column list have been converted to a list separated by comma in a cell.
Tip: In the above VBA, "," indicates the separator you need, and you can change it as you need.
0 comments:
Post a Comment