Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Excel, VBA, creating custom made user-defined functions. Cant use/import preexisting excel-defined functions?

The VBA scripting for user-defined functions is cool, but limited. I am trying to use functions that are already defined by excel, but it wont let me. The VBA says these functions are not defined. Is there a way to connect the VBA to excel or somehow import excel functions into the VBA?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    You can also use:

    Application.Sum(Range("A1:A4"))

  • pete l
    Lv 6
    1 decade ago

    You can use Excel functions by using the following syntax in VBA, here is an example of the 'Sum' function, the same applied to the other built in Excel functions

    Application.WorksheetFunction.Sum(Range("A1:A32"))

Still have questions? Get your answers by asking now.