Attachment 147609Hi..
I'd like to make an adjustment in the code below.
How can I use this code, made by my friend Jaslake, to use it with three criteria?
I need to fetch the data sheet of "origin", using the three criteria that are in cell "A2, B2, C2" worksheet "Destination", and play the result in "A6" worksheet "Destination".
![]()
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet Dim LR As Long Dim LC As Long Set ws = Sheets("Origin") If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub If Target.Address = "$A$2 $B$2 $C$2" Then Sheets("origin").UsedRange.Offset(5, 0).Clear With ws LR = .Cells.Find("*", .Cells(Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious).Row LC = .Cells.Find(What:="*", After:=[A1], _ SearchOrder:=xlByColumns, _ SearchDirection:=xlPrevious).Column .Cells(1, 1).AutoFilter Field:=1, Criteria1:=Target.Value .AutoFilter.Range.Copy Sheets("Destination").Range("A6").PasteSpecial .AutoFilterMode = False Application.CutCopyMode = False End With End If End Sub
Bookmarks