Hi,
I have a spreadsheet that has 7 columns of data (Sheet2). Another sheet in the same workbook (Sheet1) has one column and it is the same as the first column in Sheet2.
I use code generously provided by someone in response to an earlier question to search for like values in that first column and insert comment boxes into the column in Sheet1 (my target sheet):
So far, this routine correctly matches the values from the first column in each sheet. Sheet2 is the one that contains the remaining columns of data.
For each value that I find in Sheet2, I want to grab the remaining column values and concatenate them in a string of some type that I can populate into the comment boxes:
Something like:
I am not sure how to create a string with that data. I am stumped. Thanks in advance of your help.
Ben
I have a spreadsheet that has 7 columns of data (Sheet2). Another sheet in the same workbook (Sheet1) has one column and it is the same as the first column in Sheet2.
I use code generously provided by someone in response to an earlier question to search for like values in that first column and insert comment boxes into the column in Sheet1 (my target sheet):
Code:
Dim rw1 As Integer, rw2 As Integer
For rw2 = 2 to 100
Name = Sheets("Sheet1").Cells(rw2, 1)
For rw1 = 2 to 100
If Sheets("Sheet2").Cells(rw1, 1) = Name Then
For cl = 1 to 1
Sheets("Sheet1").Cells(rw2, cl).AddComment
Sheets("Sheet1").Cells(rw2, cl).Comment.Visible = True
Next
End If
Next
Next
End Sub
So far, this routine correctly matches the values from the first column in each sheet. Sheet2 is the one that contains the remaining columns of data.
For each value that I find in Sheet2, I want to grab the remaining column values and concatenate them in a string of some type that I can populate into the comment boxes:
Something like:
Code:
.Comment.Text:="TEXT HERE" & Chr(10) & "ADDITIONAL TEXT"...
I am not sure how to create a string with that data. I am stumped. Thanks in advance of your help.
Ben