Hi,
Imagine I have names of employees in column A and the name of the line they are working on (line 1, 2 or 3) in column B.
What I try to have in C1 where the value is Line 1 is a comment with the name of all employees working on line 1 that day.
My issue is that I can have from 1 to 40 employees, so I do not know how to recall the employee identified as working in line 1
I should then be abble to use that here I believe
Any suggestion for any part of the code welcome.
Thanks in advance.
Imagine I have names of employees in column A and the name of the line they are working on (line 1, 2 or 3) in column B.
What I try to have in C1 where the value is Line 1 is a comment with the name of all employees working on line 1 that day.
My issue is that I can have from 1 to 40 employees, so I do not know how to recall the employee identified as working in line 1
Code:
Dim EmployeeCell as Range
For each EmployeeCell in Range ("B:B")
If EmployeeCell.offset(0,-1).value="Line 1"
[COLOR="#FF0000"]'Is there some way to add the content of that cell to an existing text (=string)?[/COLOR]
End if
Next EmployeeCell
I should then be abble to use that here I believe
Code:
Range("C1").AddComment
Range("C1").Comment.Visible = False
[COLOR="#008000"]'note that Chr(10) is just an enter between the cells and ideally I would have 1.First person enter 2.Second person enter 3.Third person so that we know in a sec how many people are working on the line. If too difficul just a string with all names would already be fine[/COLOR]
Range("C1").Comment.Text Text:="??? & Chr(10) & ??? & Chr(10) & ??? & Chr(10) & ??? & Chr(10) & ""
Any suggestion for any part of the code welcome.
Thanks in advance.
Last edited: