TAILIEUCHUNG - Office VBA Macros You Can Use Today phần 2

Nếu bạn có kế hoạch rời khỏi bảng tính được bảo vệ, nó là một ý tưởng tốt để gọi macro này từ sự kiện Workbook_ Open bảng tính, để đảm bảo rằng người sử dụng AutoFilter và / hoặc Outline có sẵn mỗi khi họ sử dụng bảng tính. | Excel Procedures fl Sub Auto_OpenOfl Enable when the workbook is openedfl EnableAutoFilterfl End Subfl In this macro the password used to protect the sheet Pwd can be changed. The worksheet in which it is run can also be changed in the code. The line to uncomment if using Outlines is indicated in the code as well. If you plan to leave the worksheet protected it s a good idea to call this macro from the Workbook_Open event of the workbook to make sure that the users have AutoFilter and or Outline available each time they use the workbook. Exl Deleting Rows Based on Criteria With this macro you can delete all the records rows that meet certain criteria for example column A equals 0. Scenario When handling big files with a lot of records I EXamẺ0ồ7xỉs finding a way to delete all the rows that match a given condition can be a cumbersome process. This macro is designed to facilitate this task by setting a column and a condition to match in order to delete the rows. View the Appendix to learn how to store this procedure in a Standard module. Office VBA Macros You Can Use Today page 31 Excel Procedures A B c 1 D E f Exl 1 Games played Team Games won 2 0 Team A 0 3 0 Team B 0 4 1 Team c 1 5 2 Team D 0 6 1 Team E 0 7 2 Team F 1 8 2 Team G 0 9 0 Team H 0 10 2 Team 1 1 11 2 Team J 0 12 2 Team K 1 13 0 Team L 0 14 2 Team M 0 15 1 Team N 0 16 0 Team 0 if 17 2 Team p 0 18 1 Team 0 0 19 2 Team R 1 20 21 22 23 2 Conditions Team s 0 24 1 25 WhichColumn TheCondition h E007 1 0 Figure 18 - Selecting Conditions A B c 0 E F 1 Games played Team Games won 2 1 Team c 1 3 2 Team D 0 4 1 Team E 0 5 2 Team F 1 6 2 Team G 0 7 2 Team I 1 8 2 Team J 0 9 2 Team K 1 10 2 Team M 0 11 1 Team N 0 12 2 Team p 0 13 1 Team 0 0 14 2 Team R 1 15 2 Team s 0 16 17 18 Conditions 19 WhichColumn 1 20 TheCondition 0 21 M M E007 Figure 19 - Conditional Rows Deleted page 32 Office VBA Macros You Can Use Today Excel Procedures Option Explicitfl fl Sub DeleteROws fl Variable declarationsfl The range to be usedfl .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.