I have multiple rows containing list of serials as below.
A2004 / A2018 / A2038 / A2122 / A2166
I would like to format these serials in such that they are concatenated into a single string with each serials separated by a comma and the results shall be positioned at the last column of each row. Also the string must have an (M&E) text at the end. So the result should look like this.
A2004, A2018, A2038, A2122, A2166 (M&E)
Below is the code for input from a single column instead of rows. How do I tweak to get my desired result.
Sub test() For Each UsrCell In Selection a = a & UsrCell.Value & ";" Next UsrCell a = Left(a, Len(a) - 1) Open "d:\work\testfile.txt" For Output As #1 'Change your path here Print #1, a; Close #1 End Sub
Bookmarks