View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default MATCH multiple values

Modify this to suit
Sub findbadgenums()
On Error Resume Next
For I = Cells(Rows.Count, "a").End(xlUp).row To 3 Step -1
With Worksheets("sheet1").Range("e2:e18")
Set c = .Find(Cells(I, 1), LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
lc = Cells(I, Columns.Count).End(xlToLeft).Column + 1
Cells(I, lc) = c.Offset(, 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Next I
End Sub


--
Don Guillett
SalesAid Software

"Dave M" wrote in message
...
I have an employee table. In it there is a badge number in column 5. Emp.
name is column 1. Each emp. can have multiple badge numbers. When they
do,
their name is repeated in the next row with the second badge number. They
can have up to three badges.

I need to create a lookup for all employees, but need the multiple badge
numbers in columns beside their name, instead of rows with multiple names,
and their name listed only once.

Any ideas?

Thanks

Dave