Skip to main content
QUICK REVIEW

[Paper Review] User Defined Spreadsheet Functions in Excel

Jerzy Tyszkiewicz, Dermot Balson|arXiv (Cornell University)|Nov 28, 2012
Spreadsheets and End-User ComputingComputer Science5 references5 citations
TL;DR

This paper presents a novel method to implement user-defined spreadsheet functions (UDSFs) in Excel without VBA, using what-if data tables to repeatedly execute worksheet logic as a function. The approach enables declarative, reusable functions through iterative table evaluation, lowering the entry barrier for non-programmers while maintaining spreadsheet integrity.

ABSTRACT

Creating user defined functions (UDFs) is a powerful method to improve the quality of computer applications, in particular spreadsheets. However, the only direct way to use UDFs in spreadsheets is to switch from the functional and declarative style of spreadsheet formulas to the imperative VBA, which creates a high entry barrier even for proficient spreadsheet users. It has been proposed to extend Excel by UDFs declared by a spreadsheet: user defined spreadsheet functions (UDSFs). In this paper we present a method to create a limited form of UDSFs in Excel without any use of VBA. Calls to those UDSFs utilize what-if data tables to execute the same part of a worksheet several times, thus turning it into a reusable function definition.

Motivation & Objective

  • To address the high entry barrier for creating reusable functions in Excel, which traditionally requires VBA programming.
  • To enable user-defined spreadsheet functions (UDSFs) using only native Excel features, avoiding VBA entirely.
  • To provide a declarative, functional programming model within Excel's spreadsheet environment.
  • To improve usability and maintainability of complex spreadsheet logic by encapsulating it as reusable functions.
  • To demonstrate that UDSFs can be implemented via iterative execution of worksheet formulas using data tables.

Proposed method

  • Leverage Excel's what-if data table feature to execute a worksheet formula multiple times with varying inputs.
  • Structure the worksheet so that a single cell contains the function logic, with input values passed via the data table's input cells.
  • Use the data table's output column to capture the result of each evaluation, effectively simulating a function call.
  • Treat the data table's output as the return value of a user-defined function, abstracting away the iteration process.
  • Design the function interface using named ranges and structured references to improve readability and reusability.
  • Ensure idempotent behavior by isolating function logic within a self-contained worksheet region to avoid side effects.

Experimental results

Research questions

  • RQ1Can user-defined spreadsheet functions be implemented in Excel without using VBA?
  • RQ2Is it feasible to emulate functional behavior using Excel’s existing what-if analysis tools?
  • RQ3Can this approach support reusable, declarative functions that are easier to maintain than VBA code?
  • RQ4What are the performance and usability trade-offs of this method compared to native VBA UDFs?
  • RQ5How can the method be structured to minimize errors and side effects in complex spreadsheet environments?

Key findings

  • The method successfully enables user-defined functions in Excel without requiring VBA, making advanced functionality accessible to non-programmers.
  • By using data tables to simulate function calls, the approach transforms a declarative formula into a reusable function abstraction.
  • The technique maintains compatibility with standard Excel features and avoids the complexity and risk of VBA development.
  • The solution supports multiple inputs and outputs through structured data table layouts, enabling complex logic encapsulation.
  • The approach demonstrates that functional programming patterns can be emulated in spreadsheets using only built-in features.
  • The method provides a lightweight, safe, and maintainable alternative to VBA for extending Excel's computational capabilities.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.