I want to copy non emty cells from a sheet to another sheet.
This is what i have so far. But is is not working.
Sub LAB_Downloaden()
Application.ScreenUpdating = False
Workbooks.Open "C:\Users\berry\Google Drive\PKB 2D\PKB data bestanden\LAB_data.xlsx"
Set shI = Workbooks("LAB_data.xlsx").Worksheets("Invulblad")
Set shP = Sheets("Invulblad")
shI.Range("$D$9:$J$129").AutoFilter Field:=2, Criteria1:=Array( _
"EXCEL", "HOP", "PGIM"), Operator:=xlFilterValues
shI.Range(Cells(10, 13), Cells(shI.Cells(Rows.Count, 3).End(xlUp).Row, 20)) = ""
On Error Resume Next
shI.ShowAllData
shP.ShowAllData
On Error GoTo 0
shI.Range(Cells(10, 13), Cells(shI.Cells(Rows.Count, 3).End(xlUp).Row, 20)).copy
shP.Cells(10, 13).PasteSpecial Paste:=xlPasteValues, SkipBlanks:=True, Transpose:=False
Application.ScreenUpdating = True
End Sub
Bookmarks