christchaaya
Board Regular
- Joined
- Apr 5, 2013
- Messages
- 86
Code:
Sheets("SA").Select
Range("IV3").End(xlToLeft).Select
Set x = ActiveCell
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11, Criteria1:=x
Range("e12").Select
For i = 1 To 30000
If InStr(ActiveCell(i, 1).Value, "PERMISO SINDICAL") > 0 Then
ActiveCell(i, 1).Offset(0, 11) = "x"
Range("e12").Select
Else
End If
Next i
Range("e12").Select
For i = 1 To 30000
If InStr(ActiveCell(i, 1).Value, "REUNION SOLICITADA POR EMPRESA") > 0 Then
ActiveCell(i, 1).Offset(0, 12) = "x"
Range("e12").Select
Else
End If
Next i
ActiveSheet.ListObjects("Tabla1").Range.AutoFilter Field:=11
Hello guys , the code above works good but i need to make a modification so it will be better.
1) I need to loop it 40000 times but it gives me an error which tolds me that the number of loops is over the limit ( I didn't knew there's a limit of time i can loop , what is it ? )
2) As you can see in the code I filtered the table but it looks inefective because my program is starting from the first row of the tableand not from the first filtered row, how can i make the filter work properly and make the program to start working from the first filtered row ??
Thank you in advance everybody :D:D