Búsqueda de cadenas con los valores de la columna de Excel en la fila
Tengo una hoja de Excel que tiene 200 columnas. Ahora el número de filas es de 3500. Así que tengo que buscar una cadena si aparece dentro de cualquier columna para cada fila. Ahora, para hacer que el proceso sea más intenso, estoy buscando cualquier alternativa en lugar de la técnica de bucle. ¿Existe tal cosa?
IntRow6 = 2
DataCount = 0
Do While objSheet6.Cells(IntRow6,1).Value <> ""
For DataCount = 0 to UBound(VMHArray)
IntClmn3 = 1
Do While 1 = 1
If objSheet6.Cells(IntRow6,IntClmn3).Value = VMHArray(DataCount) Then
objSheet6.Cells(IntRow6,IntClmn3+2).Value=objSheet6.Cells(IntRow6,IntClmn3+5).Value
Exit Do
End If
IntClmn3 = IntClmn3 + 1
Loop
Next
IntRow6 = IntRow6 + 1
Loop
Lo anterior lleva mucho tiempo, por lo tanto, estoy buscando un código VBScript equivalente que pueda ejecutar una búsqueda más rápida.
EDITAR:
ParentColmnCount=ParentColmnCount-1
IntRow6=2
DataCount=0
Do While objSheet6.Cells(IntRow6,1).Value <> ""
For DataCount=0 to UBound(VMHArray)
If objSheet6.Range(objSheet6.Cells(IntRow6,1),objSheet6.Cells(IntRow6,ParentColmnCount)).Find(VMHArray(DataCount)) <> Nothing Then
MsgBox("Hi")
End If
Next
IntRow6=IntRow6+1
Loop
Recibo un error que dice que, error "Objeto variable no establecida" en la línea de Rango del código anterior.
ACTUALIZAR
He actualizado mi código según su sugerencia, y modifiqué la declaración de variables de la siguiente manera:
Opción explícita
Dim objExcel1, objWorkbook
Dim strPathExcel1
Dim objSheet6, objSheet3
Dim IntRow6, IntRow3
Dim IntClmn3
Dim DataCount, ParentColmnCount
Dim Falg
Dim TaskCounter
Dim r As Range Dim s As Variant
Pero vuelvo a aparecer el error: Se esperaba el final de la instrucción "en la línea" Dim r As Range "