Guest User

Untitled

a guest
Feb 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Sub LoopRange()
  2. Dim lastrow, i, lastfilterrow As Variant
  3. lastrow = Range("A" & Rows.Count).End(xlUp).Row
  4. lastfilterrow = Range("C" & Rows.Count).End(xlUp).Row
  5. For j = 2 To lastfilterrow
  6. For i = 2 To lastrow
  7. If Range("A" & i).Value Like "*" & Range("C" & j).Value & "*" Then
  8. Range("B" & i).Value = Range("C" & j).Value
  9. End If
  10. Next i
  11. Next j
  12. End Sub
Add Comment
Please, Sign In to add comment