Place attached code in a module
NOTE! a string it self does have a limit to number of characters, so if you have a LOT of items, you should concider another approach.
tip: if you're just starting to learn VBA, I suggest that you set a breakpoint at "Sub toClipboard" (F9)
then start the macro and hit F8 for each line of code. - Then you'll see what each line does and you will learn a lot. (you can even mouse over variables to see what their content is.)
Sub toClipboard()
Dim rNum As Integer ' rownumber
Dim toclip As String ' to clipboard (your string)
Range("H2").Select ' first selection as H1 contains the title
rNum = 2
nxt: ' start of loop proccess
If ActiveCell.Value = "" Then GoTo finish ' if there is nothing in the cell, end this proccess
toclip = toclip & " " & ActiveCell.Value ' add a space in between and then the activecell content to your string
rNum = rNum + 1 ' add a number to rNum so it will check the next row
Range("H" & rNum).Select ' select next cell based on rNum
GoTo nxt ' go back to loop start
finish:
'Your code for the string you've made goes here
MsgBox (toclip) ' for checking purpouses. comment out this after use
End Sub
Bookmarks