BAW
The following macros will do what you need, if I understand you
correctly. I assumed your table 1 is starting in Column A, with headers in
row 1 and data starting in row 2. I also assumed you table 2 is starting in
Column D with headers in row 8 and data starting in row 9. You will need to
change the code to match your layout.
If you wish, send me an email, identifying yourself as BAW, and I'll send
you the small file I used for this. HTH Otto
Option Explicit
Dim RngListOfVolNums As Range
Dim RngListActivities As Range
Dim i As Range
Dim k As Range
Dim RngOfActivitiesNums As Range 'Rng of numbers to right of the activities
list
Dim FoundNum As Range
Sub GetActivites()
Call GetRngs
Call GetActivityNums
End Sub
Sub GetRngs()
Set RngListOfVolNums = Range("A2", Range("A" & Rows.Count).End(xlUp))
Set RngListActivities = Range("D9", Range("D" & Rows.Count).End(xlUp))
End Sub
Sub GetActivityNums()
For Each i In RngListActivities
If Not IsEmpty(i.Offset(, 1)) Then
Set RngOfActivitiesNums = _
Range(i.Offset(, 1), Cells(i.Row, Columns.Count).End(xlToLeft))
For Each k In RngOfActivitiesNums
Set FoundNum = RngListOfVolNums.Find(What:=k.Value,
LookAt:=xlWhole)
If IsEmpty(FoundNum.Offset(, 2).Value) Then
FoundNum.Offset(, 2).Value = i.Value
Else
FoundNum.Offset(, 2).Value = _
FoundNum.Offset(, 2).Value & _
", " & i.Value
End If
Next k
End If
Next i
End Sub
> Hi All,
> I've been reviewing many entries in the forum to help me complete a task
[quoted text clipped - 34 lines]
> (separated
> by ",") in column "b" next to the volunteers name in Table A.
Oops, my email address is ottokmnop@comcast.net. Remove the "nop" from this
address. Otto
> Hi All,
> I've been reviewing many entries in the forum to help me complete a task
[quoted text clipped - 34 lines]
> (separated
> by ",") in column "b" next to the volunteers name in Table A.