Boa tarde!!
Tente assim
Sub AleVBA_13422()
Dim lastrow As Long
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False
Range("O1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),1))"
Range("P1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),3))"
Range("Q1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),4))"
Range("R1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),5))"
Range("S1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),6))"
Range("T1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),7))"
Range("U1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),8))"
Range("V1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),9))"
Range("W1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),10))"
Range("X1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),11))"
Range("Y1").Formula = "=IF(ISNA(MATCH($A1,$B:$B,0)),"""",INDEX($B:$N,MATCH($A1,$B:$B,0),12))"
Range("O1:Y1").AutoFill Destination:=Range("O1:Y" & lastrow)
Range("O1:Y1" & lastrow).Value = Range("O1:Y1" & lastrow).Value
Columns("B:N").Delete
Application.ScreenUpdating = True
End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 05/11/2014 10:25 am