Hi,
I've hunted around for code for my problem and thought this would work but doesn't.
I have a table where I want to filter 'Country Name' = to 'Country' value listed on another sheet.
(Then, copy the data from that table to other cells. - which I think I have worked out)
Any advice greatly received
I've hunted around for code for my problem and thought this would work but doesn't.
I have a table where I want to filter 'Country Name' = to 'Country' value listed on another sheet.
(Then, copy the data from that table to other cells. - which I think I have worked out)
Code:
Option Explicit
Sub Filtering_Country()
'
' Filtering Macro
'
Dim Country As Range
With Worksheets("Instructions")
Set Country = .Range("C4")
End With
With Worksheets("ImportCCB")
With .Range("A1:Z" & .Cells(.Rows.Count, "R").End(xlUp).Row)
.AutoFilter 'Turn off any previous filtering
.AutoFilter Field:=1, Criteria1:=Country_Name
End With
.AutoFilterMode = False
End With
End Sub
Any advice greatly received