How about this
Sub abc()
Const shMain As String = "Sheet1"
Dim ws As Worksheet
Dim i As Long
Dim iMatch
Application.ScreenUpdating = False
For Each ws In Worksheets
If ws.Name <> shMain Then
With Worksheets(shMain)
.Cells(1, 1).Offset(, ws.Index) = ws.Name
For i = 2 To .Cells(Rows.Count, "a").End(xlUp).Row
iMatch = Evaluate("=VLOOKUP(" & .Cells(i, 1).Value & ",'" & ws.Name & "'!A:C,3,FALSE)")
If IsNumeric(iMatch) Then
.Cells(i, 1).Offset(, ws.Index) = iMatch
Else
.Cells(i, 1).Offset(, ws.Index) = 0
End If
Next
End With
End If
Next
Application.ScreenUpdating = True
End Sub
Bookmarks