Forum Discussion

Sue's avatar
Sue
Copper Contributor
May 20, 2023

Getting numbers in textboxes with a comma recognised as numbers

Hi Nice People

 

I have a form in which the numbers in a textbox are formated: txtMyNumber=FormatNumber(txtMyNumber,2) which shows as eg 34.21 but if over 1000 then eg 1,234.89.

When I want to write the numbers in the spreadsheet I say ActiveCell.offset(3,0) = val(txtMyNumber)

This works fine if txtMyNumber is less than 1000 ie 34.21 is 34.21 BUT 1,234.89 is not recognised as a number and comes out as 1.00.

How do I turn txtMyNumber ie "1,234.89" back to "1234.89" to get number recognition?

 

With thanks,

Sue

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Sue Are you talking about a form in Power Apps or some other product? I ask because formatting of numbers is not possible in standard Microsoft Forms.

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources