For those who are not aware, I should be clear about my reference to the term "function".
Geoff is correct in that "mathematical" functions CANNOT change worksheets.
HOWEVER, my reference to the "Data-Extract" function refers to the function of extracting data - from one sheet to another. While this can be done via Excel's menu, using Data - Filter - Advanced Filter, it is preferable to use VBA. The primary reason: There is a BUG in Excel that surfaces when you use the menu method. It tells you that you CANNOT extract data to a SEPARATE sheet. Ironically, it is the ERROR message itself that prevents this from being possible via the menu. Via the VBA route, it IS possible.
Another BUG exists in the form of a message that tells you it's NOT possible to place your criteria (for the type of data you want to extract) on a SEPARATE sheet. Again, this IS possible, and not only possible but "preferable". This is because having your criteria on the same sheet will cause Excel to develop some "difficulties" in relating your criteria with the field names in your database. When placed on a SEPARATE sheet, the criteria do not have this same problem.
There are still some "quirks" about how the criteria needs to be entered. However, once one gets used to the manner in which the criteria needs to be set up, one quickly realizes that "the sky is the limit" in terms of being able to write VERY COMPLEX criteria - for use both by the "Data-Extract" function, and by "database formulas" - which can include (mathematical) functions such as: =DSUM, =DCOUNTA, =DMIN, =DMAX, etc.
While on this topic, I want to express my concern for Microsoft not including FOUR "database functions" that existed in the pre-Windows version of Lotus 123.
When Microsoft copied this "database functionality" from Lotus 123, they ONLY copied the "Data-Extract" function, and did NOT copy the following:
a) Data - Find
b) Data - Modify
c) Data - Append
d) Data - Delete
These customized "data manipulation functions" are EXTREMELY powerful - and FAST - because of the customization and because they are written in the more powerful "C" language.
Without them, Excel users have had to go to great lengths to develop VBA routines that "loop" through database lists. The development takes time, and the execution of the code takes CONSIDERABLY longer than these customized (data manipulation) functions.
I hope I've managed to clarify this situation. If anyone has any further questions, please don't hesitate to ask.
Regards, ...Dale Watson dwatson@bsi.gov.mb.ca