Created
February 10, 2018 05:07
-
-
Save DuongAQ/8691d2841545be7acc3b7393d9bf8670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Loc_Khong_Trung() | |
Application.ScreenUpdating = False 'Không cho phép cập nhật màn hình | |
With Sheet2 'Thực hiện những lệnh sau trong Sheet2 | |
.Range("E1:E10").ClearContents 'Xóa kết quả lọc cũ | |
.Range("$A$1:$C$10").AutoFilter Field:=3, Criteria1:="0" 'Lọc kết quả ở cột C | |
.Range("A3:A9").Copy 'Copy các nội dung kết quả | |
.Range("E1").PasteSpecial Paste:=xlPasteValues 'Dán kết quả lọc vào ô E1 | |
Application.CutCopyMode = False 'Bỏ chế độ Copy trong Excel | |
.Range("$A$1:$C$10").AutoFilter 'Bỏ chế độ AutoFilter | |
End With | |
Application.ScreenUpdating = True 'Cho phép cập nhật màn hình | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment