Hi everyone,
I have a sheet ("Registos") with data and i want to sort them with criteria in orther sheet (PrintDupla") based on cell Q13 and BF2. It will returm one unique row of data.
I want to copy this row to the first row of data sheet.
I have the folow code but data dont refresh when criteria change.
any help
I have a sheet ("Registos") with data and i want to sort them with criteria in orther sheet (PrintDupla") based on cell Q13 and BF2. It will returm one unique row of data.
I want to copy this row to the first row of data sheet.
I have the folow code but data dont refresh when criteria change.
any help
Code:
Sub Filtro()
'
' Macro2 Macro
'
'
Sheets("Registos").Activate
Range("A4:AE4").Select
Selection.autofilter
ActiveSheet.Range("$A$4:$AE$9").autofilter Field:=1, Criteria1:="=" & Sheets("PrintDupla").Range("BF2").Value
ActiveSheet.Range("$A$4:$AE$9").autofilter Field:=2, Criteria1:="=" & Sheets("PrintDupla").Range("Q13").Value
Range("A6:AE6").Select
Selection.Copy
Range("A1").Select
ActiveSheet.Paste
End Sub