Ayuda con una para agilizar Macro
Hola Dante,
Tengo una macro a la que agregue nombre de rango y condiciones.
Es muy lenta.
Te pido de la manera mas atenta me ayudes a ver si se puede mejorar:
Hola,
Esto ha funcionado perfectamente. Solo agregue condiciones y la macro es lenta.
Se puede mejorar?
Sub marcasunsh()
Worksheets("Unsh").Select
Columns("N").ClearContents
u = marcas
For I = 1 To Range("K" & Rows.Count).End(xlUp).Row
res = Evaluate("=INDEX(marcas" & u & ",MATCH(1,COUNTIF(K" & I & ",""*"" & marcas" & u & "& ""*""),0))")
If Not IsError(res) Then
If res = "Chaoyang" Then
Cells(I, "N") = "Trazano"
Else
Cells(I, "N") = res
If res = "Trailer" Then
Cells(I, "N") = "Westlake"
Else
Cells(I, "N") = res
If res = "HR802" Then
Cells(I, "N") = "HEADWAY"
Else
Cells(I, "N") = res
If res = "KNIGHT AT" Then
Cells(I, "N") = "GOFORM"
Else
Cells(I, "N") = res
If res = "HR701" Then
Cells(I, "N") = "HEADWAY"
Else
Cells(I, "N") = res
If res = "VANTI TOURING" Then
Cells(I, "N") = "CENTARA"
Else
Cells(I, "N") = res
If res = "Vanti Winter" Then
Cells(I, "N") = "CENTARA"
Else
Cells(I, "N") = res
If res = "TERRENA A/T" Then
Cells(I, "N") = "CENTARA"
Else
Cells(I, "N") = res
If res = "COMMERCIAL" Then
Cells(I, "N") = "CENTARA"
Else
Cells(I, "N") = res
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next
End Sub
Muchas gracias!!!