Search HoldMyTwist

Convert decimal-comma text to a number in Make

Read decimal-comma text correctly in Make Free. Check 19,95 becomes 19.95, verify arithmetic, and catch a separator mistake that changes the value.

A balance comparing two arrangements of small beads

Numbers imported as text may use a comma as the decimal separator. Make's parseNumber converts the text to a number when you specify the matching decimal separator. This Free-plan practice checks the conversion before you use the number in a workflow.

Before you start

To get started, you need a Make account. You can create a Make Free account (opens in a new tab) or sign in. Keep the scenario Inactive and use Run once. No other app connection is needed.

1. Create the decimal-comma input

  1. In Scenarios, click Create scenario. Name it Decimal number practice at the top left.
  2. Add Tools > Set variable.
  3. Set Variable name to raw_price and Variable value to 19,95.
  4. Save the module and scenario. Click Run once and inspect the result bubble for raw_price: 19,95.

Full Make editor with raw_price set to the fictional decimal-comma text 19,95

Full Make editor with raw_price set to the fictional decimal-comma text 19,95
Open full-size image

2. Parse using a comma as the decimal separator

  1. Close the result panel. Click the plus to the right of Tools and add another Tools > Set variable.
  2. Set Variable name to price_number.
  3. Paste the expression below into Variable value. Check that raw_price is a coloured token from module 1. Replace the source token if your module number differs.
  4. Save the module and scenario.
Text to copy

{{parseNumber(1.raw_price; ",")}}

The comma argument tells parseNumber which character is the decimal separator.

Full Make editor applying parseNumber to raw_price with a comma separator

Full Make editor applying parseNumber to raw_price with a comma separator

The comma argument tells parseNumber which character is the decimal separator.

Open full-size image

Watch out

A successful run does not prove the number was interpreted correctly. In this practice, using a dot separator returns 1995 from 19,95. Use the source's actual decimal separator and compare a known small example before processing a larger input.

3. Check the converted value

  1. Click Run once.
  2. Open the second Tools module's result bubble.
  3. Under Output, check for price_number: 19.95.

Full Make editor showing price_number output 19.95 after parsing 19,95

Full Make editor showing price_number output 19.95 after parsing 19,95
Open full-size image

To check arithmetic, temporarily replace the expression with the one below. Save and run again; the result should be 21.95. Restore the original expression before continuing.

Text to copy

{{parseNumber(1.raw_price; ",") + 2}}

If the value is much larger than expected

Check the decimal separator first. Do not remove every comma without knowing whether it marks a fraction or a thousands group. This example expects plain numeric text with one decimal comma. Currency symbols, blanks and mixed formats need their own checks before you use the parsed value.

Parse numbers with thousands separators

Choose the decimal separator from the source format. For fictional text such as 1,234.56, the comma groups thousands and the dot marks the decimal.

  1. In the first Tools > Set variable module, replace Variable value with 1,234.56. Keep the name raw_price and save the module.
  2. In the second module, keep price_number and paste the expression below into Variable value. Check that raw_price is the coloured token from module 1, then save.
  3. Save the scenario and click Run once. Open the second module's result bubble and check for price_number: 1234.56 under Output.
Text to copy

{{parseNumber(1.raw_price; ".")}}

For dot-grouped text with a decimal comma, change raw_price to 1.234,56 and use the comma expression below. Save and run again. The expected number is still 1234.56.

Text to copy

{{parseNumber(1.raw_price; ",")}}

Using the comma expression on 1,234.56 returns 1.23456, even though the run completes. For an arithmetic check, restore raw_price to 1,234.56 and use the dot expression. Temporarily add + 2 inside the expression before }}. Save both modules and the scenario, then run again. The result should be 1236.56. Restore the parse-only expression afterward.

The text 1,234 is ambiguous. Selecting a comma returns 1.234; selecting a dot returns 1234. Confirm what the source intended before choosing. Review columns that mix number formats before conversion, and compare a known input with its expected value.

Output for 1,234.56 with a dot decimal separator: price_number: 1234.56.

Full Make editor showing price_number: 1234.56 after parsing fictional comma-grouped text with a dot decimal separator.

Full Make editor showing price_number: 1234.56 after parsing fictional comma-grouped text with a dot decimal separator.
Open full-size image

Use Make when this conversion belongs in a workflow you repeat. For a one-off conversion in LibreOffice Calc, its documented NUMBERVALUE function (opens in a new tab) supports =NUMBERVALUE("19,95"; ","). This returns the number 19.95. The displayed decimal separator depends on the cell's number format. Start with Make Free (opens in a new tab), and check the Free-plan limits before scheduling a larger workflow.

Source: Make math functions (opens in a new tab). Screenshots show fictional practice data.

Share this guide