New Tool Radar

AI for Data & Spreadsheets

How to Check Whether an AI-Written CONCAT Formula Loses Number Formatting

Check whether an AI-written CONCAT formula loses the number formatting of the values it joins.

Schematic with three steps: Read the joined result against the formatted; Wrap each number in TEXT with its; Compare the new result with the expected.

CONCAT joins values into one text string, and it takes the stored value of each cell, not the formatted display: a price of 42.50 formatted as $42.50 joins as 42.5, and a date joins as its serial number. An AI-written CONCAT that builds a label or a sentence from numbers therefore loses currency symbols, decimal places and date formats. Wrap each number in TEXT with the format it should keep.

What you need

  • The AI-written CONCAT formula
  • The numbers and dates it joins, with their formats noted
  • The joined text the reader expects to see

Step 1: Read the joined result against the formatted cells

Run the formula and compare each number in the result with the same cell’s formatted display. A price that shows as 42.5 instead of $42.50 has lost its format.

Step 2: Wrap each number in TEXT with its format

Rewrite the formula so each number passes through TEXT with the format code the cell uses, such as “$#,##0.00” for money or “yyyy-mm-dd” for dates.

Step 3: Compare the new result with the expected text

Check the new joined text character by character against the expected label. The numbers must now show with their symbols, decimals and date shapes intact.

Worked example: synthetic price label

The table below is a synthetic example. It shows the expected result of checking an AI-written CONCAT formula; no formula was run.

Check Value Result
Price cell shows $42.50 Currency format
CONCAT result as written Total: 42.5 Symbol and zero lost
TEXT wrapper added TEXT(B2,”$#,##0.00″) Format kept
CONCAT result after fix Total: $42.50 Matches the expected label

Expected result (UNTESTED). CONCAT returns “Total: 42.5” for a price shown as $42.50, because it takes the stored value; wrapping the price in TEXT with “$#,##0.00” returns “Total: $42.50”. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • CONCAT takes the stored value, so a date joins as its serial number, such as 45658, unless TEXT formats it.
  • TEXT turns a number into text, so the result cannot be used in arithmetic without converting it back.
  • CONCAT replaces CONCATENATE, which is kept only for compatibility with older workbooks.
  • A number format code in TEXT must match the locale’s separators, or it returns an unexpected shape.

Sources

See all