Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t3940
- ---------------------------------
- Sub Copy_From_Another_Column_By_Application_Match()
- Dim x, c As Range
- Application.ScreenUpdating = False
- With ThisWorkbook.Worksheets(1)
- For Each c In .Range("D4:D" & .Cells(Rows.Count, "D").End(xlUp).Row)
- x = Application.Match(c.Value, .Columns(30), 0)
- If Not IsError(x) Then
- .Range("F" & c.Row).Resize(1, 2).Value = .Range("AF" & x).Resize(1, 2).Value
- .Range("F" & c.Row).Resize(1, 2).Interior.Color = vbCyan
- End If
- Next c
- End With
- Application.ScreenUpdating = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement