Sugestão através de VBA:
(segue anexo)
Sub Recentes()
t = Range("I3").Value
i = 4
f = Range("B65536").End(xlUp).Row
cont = 0
lin = 7
Do While i <= f And cont <= 5
On Error Resume Next
it = Application.WorksheetFunction.Search(t, Cells(i, 2), 1)
e = Err.Number
If Err.Number = 0 Then
x = Application.WorksheetFunction.Search(" x ", Cells(i, 2), 1)
If it > x Then
ad = Mid(Cells(i, 2), 1, x - 1)
Cells(lin, 8) = ad
Cells(lin, 9) = Cells(i, 4)
Cells(lin, 10) = Cells(i, 5)
Else
ad = Mid(Cells(i, 2), x + 3, 50)
Cells(lin, 8) = ad
Cells(lin, 9) = Cells(i, 4)
Cells(lin, 10) = Cells(i, 5)
End If
i = i + 1
lin = lin + 1
cont = cont + 1
Else
i = i + 1
e = 0
End If
Loop
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 14/11/2016 10:50 am