Hi,
What I want to achieve is to copy my selection without the header. Unfortunately I am very new to VBA and I was unable to apply any of the solutions I found to my code, so I am asking your help now.
My code is as follows:
Thanks.
What I want to achieve is to copy my selection without the header. Unfortunately I am very new to VBA and I was unable to apply any of the solutions I found to my code, so I am asking your help now.
My code is as follows:
Code:
Sub Extract_Data2()
Application.ScreenUpdating = False
Set a = ActiveSheet
'Select Range
Range("C5:e240").Select
'Apply Autofilter
Selection.AutoFilter
Selection.AutoFilter field:=1, Criteria1:=">2"
Selection.AutoFilter field:=3, Criteria1:=">0"
Selection.SpecialCells(xlCellTypeVisible).Copy
Sheets("graphs").Activate
Set b = ActiveSheet
Range("a2").Select
'Paste the copied cells
ActiveSheet.Paste
Range("a2").Select 'unselect everything
'Go back to the original sheet
Sheets("wind speed for each hour").Activate
'Take the Autofilter off
Selection.AutoFilter
End
End Sub
Thanks.