Đang chuẩn bị liên kết để tải về tài liệu:
Excel 2002 Power Programming with VBA phần 4

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Bạn chắc chắn quen thuộc với các chức năng bảng tính Excel, ngay cả người mới biết làm thế nào để sử dụng chức năng bảng tính phổ biến nhất, chẳng hạn như AVERAGE, SUM, và IF. Bằng cách tính của tôi, Excel có hơn 300 chức năng bảng tính được xác định trước, cộng với chức năng bổ sung có sẵn thông qua các phân tích ToolPak add-in. | 258 Part III Understanding Visual Basic for Applications Why Create Custom Functions You are undoubtedly familiar with Excel s worksheet functions even novices know how to use the most common worksheet functions such as SUM AVERAGE and IF. By my count Excel contains more than 300 predefined worksheet functions plus additional functions available through the Analysis Toolpak add-in. If that s not enough however you can create custom functions by using VBA. With all the functions available in Excel and VBA you may wonder why you would ever need to create new functions. The answer to simplify your work. With a bit of planning custom functions are very useful in worksheet formulas and VBA procedures. Often for example you can create a custom function that can significantly shorten your formulas. And shorter formulas are more readable and easier to work with. I should also point out however that custom functions used in your formulas are usually much slower than built-in functions. As you create applications you may notice that some procedures repeat certain calculations. In such a case consider creating a custom function that performs the calculation. Then you can simply call the function from your procedure. A custom function thus can eliminate the need for duplicated code reducing errors. Co-workers often can benefit from your specialized functions. And some may be willing to pay you for custom functions that save them time and work. Although many cringe at the thought of creating custom worksheet functions the process is not difficult. In fact I enjoy creating custom functions. I especially like how my custom functions appear in the Paste Function dialog box along with Excel s built-in functions as if I m reengineering the software in some way. In this chapter I tell you what you need to know to start creating custom functions and I provide lots of examples. An Introductory Example Without further ado here s an example of a VBA Function procedure. A custom function

Đã 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.