Skip to Content

Excel Python Functions

This user guide explains how to use a Boardflare add-in which provides Python functions to use in Excel. Boardflare offers several add-ins which contain different collections of Python functions; this guide applies generally to all of them. The images you see in this guide may vary slightly depending on which add-in you are using, but the overall experience is the same.

Getting Started

After you’ve installed the add-in from the Microsoft AppSource store, follow these steps to get started:

  • Open Excel and create or open a workbook
  • Click on the name of the add-in (e.g. Solver) in the Home ribbon to launch it
  • A taskpane appears on the right side of Excel
  • The first time you open the add-in, you’ll be prompted to sign in with your Microsoft account
  • The custom functions are now available for use in your workbook
  • You may also insert functions using the Function Dialog as explained below

Custom Functions

Custom functions provided by the add-in can be used directly in Excel cells, like SUM() or AVERAGE(). All of the custom functions are prefixed with BF. to distinguish them from native Excel functions and those from other add-ins. For example, a custom function named FIXED_POINT would be used as =BF.FIXED_POINT(...) as shown below.

=BF.FIXED_POINT("math.cos(x)", 0.5, 1e-10, 600, "del2")

Function Dialog

The Function Dialog is available from the add-in taskpane and provides a guided, step-by-step experience for finding and using functions similar to Excel’s built-in “Insert Function” feature (Shift+F2 or Formulas > Insert Function). It helps you search for functions, view their signatures and descriptions, enter parameters with live previews, and insert either custom functions, =PY() formulas, or static results into your worksheet. The Function Dialog follows a three-step workflow, as shown in the sections below.

  1. Select Function - Browse and find the function you need using search and category filters
  2. Select Arguments - Choose function arguments
  3. Insert - Enter arguments and choose insertion method

Select Function

Use either the search box or category dropdown to find a function. Click the function name to view details and proceed. When you click Next, the active cell you have selected in the sheet will be where the function or result is inserted. You can change the target cell at this point by simply selecting a different cell in the worksheet before clicking Next.

Search for function
Search for function
Select a category
Select a category
A category is picked
A category is picked

Select Arguments

You see input fields for each function argument. Required arguments are marked with an asterisk (*), and optional arguments shows “Optional”. A preview of the value represented by your input appears to the right of each field.

Three ways to enter values:

  1. Type directly into the field: Simply type the value you want

    • Examples: math.cos(x), 0.5, 1e-8, formula_result
    • This only works for text, single numbers, or cell references (not array literals, e.g. {1,2;3,4})
  2. Click to select a range: Click the input field

    • This activates Excel’s range selection mode
    • Select the desired cell or range in your workbook (linking to other workbooks is not supported)*
    • The field populates with the selected range
    • The preview shows the values it contains
  3. Use a dropdown: For arguments with predefined options

    • Select from the dropdown menu
Select a range
Select a range
Insert a literal
Insert a literal
Select from a list of options
Select from a list of options

Inserting Formula or Result

Before clicking Insert, configure how you want the result inserted:

Insert as Formula (default, nothing checked):

  • Inserts a formula like =BF.FIXED_POINT("math.cos(x)", 0.5, 1e-10, 600, "del2")
  • Formula appears in the cell and stays dynamic
  • Result updates if you change cell references it depends on
  • Same behavior as typing the formula directly into the cell

Insert as Result (Check “Insert result instead of formula”):

  • Inserts only the computed result (e.g., 0.7390851332151607)
  • No formula stored, just the value
  • Won’t recalculate, it is just a static value.
  • Useful for one-time calculations, breaking dependencies

Excel =PY() formula (Check “Insert =PY() formula”):

  • Inserts a Python formula like =PY("python code here")
  • Executes using Excel’s built-in Python environment
  • Allows you to easily customize Python code using Python in Excel features

Note: The Excel =PY() formula option only appears for functions that are supported by Python in Excel. Some functions require packages or features not available in Excel’s Python environment.

At the bottom of the argument entry screen, you’ll see your target cell displayed:

  • Format: Target cell: Sheet1!A1. Click Back to change.
  • This is where your formula or result will be inserted
  • To change the target cell, click Back to return to the function list, select a different cell in your worksheet, then proceed again
Insert result, not formula
Insert result, not formula
Insert a Python formula
Insert a Python formula
Select from a list of options
Select from a list of options

Results

Once you’ve filled in all required arguments and configured your insertion options:

  1. Click the “Insert” button (bottom right)
  2. The button temporarily shows “Working…” while the add-in processes your function
  3. When complete, the formula or result is inserted into your target cell
  4. The dialog returns to the function search screen so you can insert again if needed

What gets inserted:

  • If “Insert as Formula” is selected: A formula like `=BF.FIXED_POINT(“math.cos(x)”, 0.5, 1e-10, 600, “del2”)
  • If “Insert as Result” is selected: Just the computed value (e.g., 0.7390851332151607)
  • If “Insert =PY() formula” is selected: A Python formula like =PY("...code...") which executes in Excel’s server-based Python environment and behaves identically to the custom function.

Errors

#VALUE! Error

This error occurs when an argument to a function is missing or has the wrong type. Common causes include:

  • Incorrect range references (e.g., referencing a range with incompatible data types)
  • Missing required arguments in the function call
  • Passing text where a number is expected, or vice versa

Solution: Check that all required arguments are provided and have the correct type. Verify that any range references point to cells with compatible data types.

#NAME? Error

This error appears when Excel doesn’t recognize the function name. This typically happens when:

  • The function name is spelled incorrectly (e.g., BOARDFLARE.RUNPYY instead of BOARDFLARE.RUNPY)
  • The add-in hasn’t fully loaded yet
  • You’re using a function that doesn’t exist in the current add-in

Solution: Double-check the spelling of the function name and ensure it’s prefixed with BF.. If you just installed the add-in, wait a moment for it to fully load.

#BUSY! Error

This error is typically temporary and indicates that the add-in is still processing. This is normal and expected in these situations:

  • When importing libraries for the first time (can take 5-10 seconds)
  • With a slow internet connection
  • While the function is still calculating

Solution: This usually resolves itself. Wait a few seconds and the error should clear. If it persists, try restarting Excel or reloading the browser window.

Other Add-in Errors

You may also encounter these messages in the task pane:

  • Error loading add-ins - The add-in failed to initialize
  • We're starting the add-ins runtime, just a moment... - The runtime is starting up

Solution: If you see persistent error messages and functions aren’t working, try restarting Excel or reloading the browser window. This will reinitialize the add-in.

Last updated on