Excel Guides

Understanding Functions in Macros in Excel

When you record a macro in Excel, the Macro Recorder tool automatically generates VBA code that includes a number of different functions. These functions can be divided into two main categories: built-in functions and user-defined functions. Built-in functions are those that are included as part of the Excel application and are always available to your macros. User-defined functions are those that you create yourself using VBA code. In this article, we'll take a closer look at both types of functions and how they can be used in macros.

Built-in Functions

As we mentioned, built-in functions are those that are included as part of the Excel application. There are dozens of these functions, and they can be used for a variety of purposes. Some of the most commonly used built-in functions include:

  • ABS(): Returns the absolute value of a number
  • AND(): Returns TRUE if all its arguments are TRUE
  • CHOOSE(): Returns a value from a list of values based on an index number
  • COLUMN(): Returns the column number of a cell reference
  • COUNT(): Counts the number of cells that contain numbers within a range
  • DATE(): Returns the current date
  • DAY(): Returns the day portion of a date value
  • FALSE(): Returns the logical value FALSE
  • IF(): Evaluates a condition and returns one value if the condition is TRUE, and another value if the condition is FALSE
  • INDEX(): Used to return a value or reference from within a range or array.

Move beyond 


Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.