Excel adds FORMATNUMBER and custom data types
Excel

Excel adds FORMATNUMBER and custom data types

by HubSite 365 about Wyn Hopkins [MVP]

Microsoft MVP | Author | Speaker | Power BI & Excel Developer & Instructor | Power Query & XLOOKUP | Purpose: Making life easier for people & improving the quality of information for decision makers

Excel’s FORMATNUMBER and custom data types let users keep number formats with values and work with structured records in formulas.

Key insights

  • FORMATNUMBER attaches a number format to a value, helping its display format travel with formula results.
  • Use the ENTITY function to create a custom data type with named fields.
  • Table[#Entities] can turn table rows into data types that can be inspected and customized.
  • Dot functions include .RemoveFields(), .GetFieldNames(), and .SetIcon().
  • The features are rolling out to Microsoft 365 Insiders in the Beta Channel on Windows, Mac, and Excel for the web.

Excel’s FORMATNUMBER function attaches a display format to a numeric value, while custom data types let formulas work with structured values made up of named fields. These capabilities matter to Excel users who build dynamic-array formulas, reusable workbooks, or worksheets with related information grouped into records. Wyn Hopkins [MVP] demonstrates FORMATNUMBER and table-based entities in a first look at the features.

What’s new

Ordinary cell formatting is applied to a cell, so a formula result that spills into additional cells may not carry that formatting to the new results. FORMATNUMBER addresses this by attaching a preferred number format to the value itself. The result remains a number for calculations rather than becoming formatted text.

For example, displays a numeric value as currency. If a dynamic array spills from a formula wrapped in FORMATNUMBER, the format can apply to the resulting values as the array grows. The function can also preserve date, percentage, or other number formats.

Custom data types, also called entities, let a cell hold a structured value with named fields rather than just one ordinary value. The ENTITY function creates an entity from field names and values; formulas can then refer to an individual field with dot notation, such as . This gives workbook authors a way to organize related data and use its parts in formulas.

Who it is for and what you need

The features are aimed at Excel users who build and maintain formula-driven workbooks, including people working with dynamic arrays or related values such as a product’s price, supplier, and delivery date. Users can also turn existing table data into entities, so creating every structured value from scratch is not required.

Microsoft is rolling out the capabilities to Microsoft 365 Insiders in the Beta Channel on Windows and Mac, as well as Excel for the web. Microsoft lists Windows Version 2612, build 20715.20000 or later, and Mac Version 16.117, build 26111815 or later for the Insider rollout. These are Insider builds, not a statement of general availability.

For a table-based starting point, the demonstration uses a table named . Excel’s reference produces entities from the table rows. For a custom entity built from formula values, the function is the relevant starting point.

How it works

For values that need a consistent display format, wrap the value or calculation in FORMATNUMBER and provide the desired number-format string. In the demonstration, a custom format is used to show negative numbers in red and in parentheses. Because the format is associated with the value, it can apply to newly spilled results without relying on manually formatting each destination cell.

  1. Enter a formula such as to apply a format to a dynamic array. Adjust the value and format string for your worksheet.
  2. To create entities from a table, enter a structured reference such as . Excel returns the table rows as data types.
  3. Use dot functions on an entity to inspect or change it. The demonstration uses to change the icon and to exclude a field.
  4. Refer to a field directly with dot notation, or use an entity reference such as to retrieve a field value.

The dot-function family also includes ways to set fields, retrieve field names and values, check whether a field exists, and set number formatting. Microsoft says these functions can work with existing Stock and Geography data types as well as custom entities. The Microsoft [Excel topic page](https://www.hubsite365.com/en-ww/pro-office-365?topic=1bab3dee-e796-eb11-b1ac-000d3a46c042) provides more Excel coverage.

Limitations and alternatives

These capabilities are in the Beta Channel Insider rollout, so users should treat behavior as preview-stage and confirm that their Excel environment has the features before designing a workbook around them. The listed Windows and Mac builds provide a concrete check for Insider users.

FORMATNUMBER handles number formatting; it does not apply cell background colors. The demonstration notes that its custom number format changes the displayed numbers, while the desired background styling is not part of that approach. For custom data types, table entities are one route, while ENTITY lets users construct structured values directly in formulas.

Entities can reduce the need to look up separate fields in some workbook designs, but they do not automatically replace every XLOOKUP or existing table layout. Consider whether a named-field structure makes the workbook easier to understand and maintain, and test the formulas and display behavior in the relevant Insider version.

Sources

Frequently asked questions

What does FORMATNUMBER do in Excel?

FORMATNUMBER attaches a preferred number format to a value, so formula results can retain how they should display. The value remains numeric and can still be used in calculations.

How do you create custom data types in Excel?

Use ENTITY to create an entity from named fields and values, or use a table reference such as Table[#Entities] to return table rows as entities. Dot notation can then access a field.

Who can use Excel’s new FORMATNUMBER and entity functions?

The capabilities are rolling out to Microsoft 365 Insiders in the Beta Channel on Windows and Mac, and to Excel for the web. Microsoft lists Windows Version 2612, build 20715.20000 or later, and Mac Version 16.117, build 26111815 or later.

Can Excel entities be customized?

Yes. Dot functions can inspect and modify entities. Examples include .RemoveFields() for excluding a field and .SetIcon() for changing an entity’s icon.