Macro for using multiple selected cells
Hi
This will put your string on sheet "mydata" in cell "A1". The selected
cells can be anywhere on the active sheet, and you would need further
error checking if you want to restrict people to one particular
column. Names will be seperated by commas, but you can change this
below. you will get an error if no cells are selected.
Sub tester3()
Dim Cell As Range
Dim mystring As String
For Each Cell In SelectedRange
mystring = mystring & ", " & Cell.Text
Next Cell
'take off leading 2 characters ", "
mystring = Right(mystring, Len(mystring) - 2)
Worksheets("mydata").Range("a1").Value = mystring
End Sub
regards
Paul
On May 11, 9:24 am, OTS wrote:
Hi! I have no experience with programming macros so bear with me. I'm not
sure if my case is possible to do in some easy way.
I want the user to be able to select some cells in a coulmn Users in a
worksheet. This selection will then be concatenated to a string of Usernaes
and inserted in a user-selected cell in another worksheet.
--
OTS
|