Need help with a VB on this, I have a sheet which contains the list of employees(exhibit-1) and another sheet which contains compensation details of these employees (exhibit-2), once the user inputs the ID of the employee in the General Information tab (exhibit-3), i want the macro to go to Exhibit-2 and retain information only for that assignee and delete the other assignee information.
Here is what I came up with.
Dim ID As Variant
Dim wsC As Worksheet
Dim wsG As Worksheet
Dim rng As Range
Dim lops As Integer
Dim i As Integer
ID = Worksheets(“General_Info”).[B9]
Set wsC = Worksheets(“Compensation”)
Set wsG = Worksheets(“General_Info”)
Set rng = wsC.Range(“A:A”)
lops = Application.CountA(rng) – 1
Application.ScreenUpdating = False
For i = 1 To lops
If ActiveCell <> ID Then