Quiero hacer un script de VBA que pueda cambiar un valor en una tabla en función de una matriz de valores . Estos valores se encuentran a través de la función application.match . ¿Puede alguien ayudarme con este? Empecé VBA ayer, así que no soy un usuario avanzado. (Encontré mucha información a través de Google, pero esta fue difícil de encontrar). El código usado está debajo
Dim i As Integer For i = 16 To 29 If ThisWorkbook.Sheets("General").Range("A" & i) = "" Then Else MsgBox ThisWorkbook.Sheets("General").Range("A" & i) 'Find value in Table Dim Assignments As Worksheet Dim TargetTable As ListObject Dim TargetRW As Variant Set Opdrachten = ThisWorkbook.Sheets("Jobs") Set TargetTable = Opdrachten.ListObjects("Assignments") TargetRW = Application.Match(i, TargetTable.ListColumns(1), 0) MsgBox TargetRW 'I get an error at this point' 'Change value in Table If Not IsError(TargetRW) Then TargetTable.DataBodyRange.Cells(TargetRW, 6) = "Yes" Else MsgBox "Error, allready verified." End If End If Next iGracias por adelantado