Segue um exemplo de procura em VB (Somente da matricula)
Sub procurando()
Dim nLin As Long, Cont, Dl As Range, wS As Variant
Dim Nome As String, nMat As String, i As Long
For Each wS In Worksheets
Nome = wS.Name
If Nome <> UCase("Consulta") Then
For i = 3 To 7
nLin = Worksheets(Nome).Range("c65000").End(xlUp).Row
nMat = Sheets("Consulta").Range("A" & i).Value
If nMat <> "" Then
With Worksheets(Nome).Range("C4:C" & nLin)
Set Dl = .Find(nMat, LookIn:=xlValues)
If Not Dl Is Nothing Then
Sheets("Consulta").Cells(i, 2) = Sheets(Nome).Cells(Dl.Row, 4).Value
Sheets("Consulta").Cells(i, 3) = Nome
Sheets("Consulta").Cells(i, 4) = Dl.Row
End If
End With
End If
Next
End If
Next
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 17/09/2011 4:48 pm