Guest User

Untitled

a guest
May 21st, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Sub CondicionalTopTxx()
  2.  
  3. Dim OrigenHoja As Excel.Worksheet, _
  4. DestinoHoja As Excel.Worksheet, _
  5. a As Integer
  6.  
  7. Set OrigenHoja = Worksheets("TNC D")
  8. Set DestinoHoja = Worksheets("TNC B")
  9.  
  10. OrigenHoja.Activate
  11.  
  12. For a = 2 To 40
  13.  
  14. Set valor = OrigenHoja.Cells(a, 17)
  15.  
  16. If valor.Value < 4 Then
  17.  
  18. Range("O14:S16").Copy
  19. DestinoHoja.Range("O14:S16").PasteSpecial xlPasteAll
  20. Application.CutCopyMode = False
  21.  
  22. End If
  23.  
  24. Next
  25.  
  26. End Sub
Add Comment
Please, Sign In to add comment