Function Problems

Generate a Periodic Table in Excel with Dynamic Array Formulas

Elise WilliamsElise Williams Nov 18, 2026 869 views

Question details

Generate a 9-by-18 periodic table from atomic numbers, group values, and element symbols using a single formula.

Generate a Periodic Table in Excel with Dynamic Array Formulas
Product
Microsoft Excel
Device & OS
not provided
Scenario
Create the table without changing the reference data or using the fill handle.
Observed behavior
The desired result is a spilled array that places each atomic number and symbol in its calculated period and group position.
Before you start

Use a version of Excel that supports LET, SCAN, MAKEARRAY, and XLOOKUP. Ensure the source columns are in atomic-number order, have matching lengths, and are named atomic, group, and symbol.

Solution 1Recommended

Build the periodic table with one dynamic array formula

Use this formula to calculate element coordinates and spill the table into a 9-by-18 range.

SCAN derives period and group coordinates from the ordered group values. MAKEARRAY creates the grid, and XLOOKUP returns the matching atomic number and symbol for each cell.

The formula treats group values greater than 20 as special entries: it calculates their output row as the group value minus 93 and advances their output column from the preceding group coordinate. The resulting lanthanide and actinide layout therefore depends on the source values and their order.

1
Check the source names

In Excel, select Formulas > Name Manager and verify that atomic, group, and symbol refer to the corresponding source columns.

2
Enter the formula

Select the intended upper-left output cell and enter: =LET(pp,SCAN(0,group,LAMBDA(p,q,IF(q=1,p+1,p))),p,IF(group>20,group-93,pp),g,SCAN(0,group,LAMBDA(p,q,IF(q>20,p+1,q))),MAKEARRAY(9,18,LAMBDA(r,c,XLOOKUP(r&";"&c,p&";"&g,atomic&CHAR(10)&symbol,""))))

3
Display both lines

Select the spilled output range, choose Home > Wrap Text, and adjust row heights and column widths so the atomic numbers and symbols are visible.

4
Check the layout

Compare the spilled table with the intended arrangement, especially the lanthanide and actinide rows. Leave the 9-by-18 output area clear so Excel can spill the formula.

Build the periodic table with one dynamic array formula
Special group values affect placement: The source values determine the layout. For example, assigning groups 101 and 102 to elements 57 and 89, and group 3 to elements 71 and 103, would produce a layout closer to a conventional periodic table. The formula does not change the source data.
Free Microsoft Office alternative

Work with periodic table spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for Excel file formats, making it easy to move between office suites. Check formula compatibility before relying on this Excel-specific dynamic array solution in WPS Spreadsheets.

Open and edit spreadsheets in a familiar interfaceWork with Excel-compatible XLS and XLSX filesOrganize element data and format periodic table worksheetsUse a free, lightweight office suite for everyday documents
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula show a #SPILL! error?

The formula needs an empty 9-by-18 output area. Clear any contents or merged cells blocking that area, then select the formula cell to recalculate.

How do I show the atomic number above the symbol?

The formula uses CHAR(10) between the two values. Select the output range and choose Home > Wrap Text, then increase the row height if needed.

Why are some elements in unexpected positions?

The formula calculates positions from the order and values in the group range. Check the special group values and their sequence, particularly for the lanthanides and actinides.

Can I use this formula in an older version of Excel?

The formula requires LET, SCAN, MAKEARRAY, and XLOOKUP. If your Excel version does not support these functions, use a compatible version or a different approach.

Does WPS Spreadsheets calculate the same formula?

WPS Spreadsheets supports Excel file formats, but support for individual dynamic array functions can vary. Test the formula in your WPS version before depending on its results.