Guest User

Untitled

a guest
Dec 12th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. For i = .Rows.Count To 1 Step -1
  2. If .Item(i) = "w" Or "x" Or "y" Or "z" Then
  3.  
  4. .Item(i) = "A"
  5.  
  6. End If
  7. Next i
  8.  
  9. If .Item(i) = "w" Or .Item(i) = "x" Or .Item(i) = "y" Or .Item(i) = "z" Then
  10.  
  11. For i = .Rows.Count To 1 Step -1
  12. Select Case .Item(i)
  13. Case "w", "x", "y", "z"
  14. .Item(i) = "A"
  15. Case "something else"
  16. 'If you have other criteria
  17. Case Else
  18. 'If you have a action item for something that isn't any of the above
  19. End Select
  20. Next i
  21.  
  22. Dim arr() As String: arr = Split("w,x,y,z", ",")
  23. For i = .Rows.Count To 1 Step -1
  24. For j = LBound(arr) To UBound(arr)
  25. If .Item(i) = arr(j) Then .Item(i) = "A"
  26. Next j
  27. Next i
Add Comment
Please, Sign In to add comment