kbay808
asked on
How to use VBA to copy a range where the value in column meets a criter
I have a table on one sheet, but I need to show the related records for an ID on another sheet. On the attached file on the Ticket Viewer sheet you can select an ID number from the dropdown in cell B1. When an ID is selected, I need all of the data that matches that value on the Report 1 sheet in column A to populate below the headers in row 3.
Ticket-Viewer.xlsm
Private Sub Worksheet_Change(ByVal Target As Range)
' Update/Audit Passed btns
If Not Intersect(Target, Range("B1")) Is Nothing Then
If Range("B1").Value <> "" Then
'Need to add code to copy data from the Report 1 sheet
Else
Range("A4:H100").ClearContents
End If
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much
This gives the option of copying the results of a filter to another location. It can be incorporated into a VBA routine that clears previous filter and copies the new data.