Application.ScreenUpdating = False
' CÓDIGO del 1º IF
If Col = 26 And Fil = 23 Then
Texto = Cells(23, 26)
For Fil = 42 To 657 Step 14
For Col = 37 To 121 Step 14
If Texto = Cells(Fil, Col) Then
Range(Cells(Fil, Col), Cells((Fil + 13), (Col + 12))).Select
Selection.Copy
Range("AG4").Select
ActiveSheet.Paste
End If
Next
Next
End If
' CÓDIGO del 2º IF
If Col = 35.......... etc
... etc
End If
End Sub
if range("A1").value <> "NO"
codigo del if 1
end If
Application.ScreenUpdating = False
if range("A1").value <> "NO"
' CÓDIGO del 1º IF
If Col = 26 And Fil = 23 Then
Texto = Cells(23, 26)
For Fil = 42 To 657 Step 14
For Col = 37 To 121 Step 14
If Texto = Cells(Fil, Col) Then
Range(Cells(Fil, Col), Cells((Fil + 13), (Col + 12))).Select
Selection.Copy
Range("AG4").Select
ActiveSheet.Paste
End If
Next
Next
End If
end If
' CÓDIGO del 2º IF
Application.ScreenUpdating = False
' CÓDIGO del 1º IF
if range("A1").value <> "NO" then
If Col = 26 And Fil = 23 Then
Texto = Cells(23, 26)
For Fil = 42 To 657 Step 14
For Col = 37 To 121 Step 14
If Texto = Cells(Fil, Col) Then
Range(Cells(Fil, Col), Cells((Fil + 13), (Col + 12))).Select
Selection.Copy
Range("AG4").Select
ActiveSheet.Paste
End If
Next
Next
End If
end if
' CÓDIGO del 2º IF
If Col = 35.......... etc
... etc
End If