Format long numbers with commas

Hello

I have a table with a lot of 4-digit + numbers

I would like to add commas in the right places, for example:

2000 should be 2,000

23783 should be 23 783

and so on.

Is there a built in method to do this?

If not, what is the best way to do this?

Thank you

Davey

Hello

Use find... Replace with Grep:

Search: (\d+)(\d{3)}

change to: $1, $2

and repeat until each multinumber (7 +) matched

Jarek

Tags: InDesign

Similar Questions

  • Numbers with comma in the data Cube Viewer

    Hello

    I want to know what to do to display numbers with comma in the data Cube Viewer. The data type of the measure in the cube is NUMBER (4.3). The default aggregation is AVERAGE. When I load the cube with the numbers of the exactly NUMBER format (4.3) - in the data Cube Viewer I see only rounded integer values without decimal point.


    If I load the test instead of cube table - the numbers are loaded in the correct format.


    What should I do to load the cube with point numbers? Is this possible in OWB?

    Now, I decided to use a way to go around it - simply put 1453 instead of 1.453. Then it works (but this isn't a great solution). It is the only way?

    Thanks in advance for any help

    Peter

    Hi Peter

    The cube data viewer has a toolbar with a lot of options... formatting, you can add and remove the numbers after the decimal point. From memory, I think you have to select the cells you want, you can click and select all the cells in the table and then use the button Add digits after the decimal point.

    See you soon
    David

  • formatting numbers with comma

    Hello

    I use the JDE 4.3. I am trying to add commas to my Double.

    E.g. 123456.1234-> 123,456.12

    I tried searching the forum, but I can't find an answer. I tried to use this code:

    Formatter formatter = new Formatter("en");

    System.out.println (FormatNumber (double.parseDouble ("123456.1234"), 2));

    but I get this--> 123456.12

    Since there is no method available in the API of the rim, I just built my own method to add commas; If you have something better, something more optimized, please report!

    public String CommaSeparator(String nNum){    final static char DOT = 46;    growingstring="";    decimalString="";    if(Double.parseDouble(temp) >= 1000)    {        //if it doesn't have a decimal portion        if(nNum.indexOf(DOT) == -1)        {            whatihave = nNum;            Length = whatihave.length();        }        else  //else, split the string and put the decimal portion in                  decimalString        {        decimalString = nNum.substring(nNum.indexOf(DOT),nNum.length());      whatihave = nNum.substring(0, nNum.indexOf(DOT));        Length = whatihave.length();        }
    
            do        {            PartA = whatihave.substring(0, Length - 3);            PartB = whatihave.substring(Length - 3, Length);            growingstring = "," + PartB + growingstring;            whatihave = PartA;            Length = whatihave.length();        }while (Length > 3);
    
            if (whatihave == "")        {            growingstring = growingstring.substring(1, growingstring.length());        }        else        {            growingstring = whatihave + growingstring;        }
    
            if(decimalString != "")        {            gowingstring = growingstring + decimalString;        }
    
            return growingstring;    }    return temp;} 
    
  • Change the format of numbers with GREP?

    Hello

    I'm sure it's easy, but I just can't get my head around it.

    I have a large table in ID4. I need to change all the format of all the more than a thousand numbers.

    For example, 1234 becomes 1 234 and 12345 becomes 12 345, but it leaves all smaller numbers (IE up to three digits) that they are.

    I've tried a few things, but all fail to get the results I need

    Help!

    Maybe something like this:

    Search: (? )

    Change of: , $0

    Run several times to get everything changed.

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

  • expression of numbers with commas counting

    I use the following expression to create a countdown number but I need to recognize or to insert commas to eight digits. Can someone tell me how to change it:

    startT = 0;

    endT =. 5;

    beginVal = 12400000;

    endVal = 10700000;

    t = linear(time,startT,endT,beginVal,endVal);

    Math.Floor (t) + "

    PS there are also moments that I would add dollar signs or two percent signs.

    Expressioneering of Dan Ebberts design guide

    Mylenium

  • Select decimal between numbers and replace with comma - style Grep

    H,

    Could someone please help with some Grep expressions.

    I have a big document (s) I need to locate all decimals between numbers and replace them with commas. I have a little grep expression that can locate the numbers and a decimal number, but I need to follow the numbers once again, as I am also find figures at the end of a sentence:

    To find:

    22.356

    so far:

    \d+(?=\.)

    replace:

    \d+(?=\,)

    Lister

    This should work for you

    To find

    (\d+)\. (\d+)

    Replace

    $1, $2

    That there are numbers with a period between them. The expression of replacement will replace your numbers by themselves and the period with a comma. Because the search expression is looking for numbers on both sides of your period, it will leave the ends of sentences only.

  • Generating random numbers with format 18XX88YYYYY

    I've been tryig to generate random numbers with
    format 18xx88yyyyy
    here
    18, followed by two random number then 88 followed by five random number. Here 18 and 88 are set to place one, two, five and sixth position.

    but I am unable to get the logic.

    So please help


    Thanx

    Achyot

    Try this:

    SELECT    '18'
           || ROUND (DBMS_RANDOM.VALUE (1, 100))
           || '88'
           || ROUND (DBMS_RANDOM.VALUE (1, 100000))
      FROM DUAL
    

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev a. (10g OCP)
    http://kamranagayev.WordPress.com

  • Numbers with decimals and text in a field

    Hello all, I have created a form to fill out pdf for use as a budget calculator. Many of the fields require the word "(reserved)" to be entered in the field, if there is no value. If I set the format of the number field, I can't type all the letters in the field. If I set the size to zero, I can type the numbers and letters, but it will not calculate if the numbers have commas and decimal points. Any ideas? Thank you!

    OK, something that will work is to add two functions to a JavaScript script at the level of the document:

    function reservedFormat() {}

    AFNumber_Format (2, 0, 0, 0, "", false);

    If (! event.value) event.value = "(reserved)".

    }

    function reservedKeystroke() {}

    AFNumber_Keystroke (2, 0, 0, 0, "", false);

    }

    Then set up the field with a custom Format and JavaScript typo that represents (respectively):

    Custom format JavaScript

    reservedFormat();

    Custom keystroke JavaScript

    reservedKeystroke();

    Here is an example of PDF file that demonstrates this: https://acrobat.com/#d=VCzfhUuUgB1GW2XQAh6Zyg

    That this fact is to use the same built-in routines that Acrobat uses when configure you a number format, but add the bit that displays the string "(reserved)" when the field is empty. This is done in the Format script since you just want to display this value and do not it field value when the field is empty. Note that if the value of the field is zero, it will appear not "(reserved)".

  • Word graphic value Font.vi how can you Format axis numbers?

    Hello

    I need assistance with formatting of the AXIS on a chart in Word using Labview.  In my situation, I have reading data like this:

    0,0033

    0.0003

    0,0203

    Etc...

    I need FOUR decimal places to display correctly the numbers.

    When I run through Labview and Word... All I get is ZEROS through my axis.

    If I double click on the AXIS (in Word) and go to the properties of the "Number" tab and CHANGE 'General' to 'NUMBER' and define the "third DECIMAL' to '4 '.

    The graph looks EXACTLY as I want it to look:

    After the manual settings are applied:

    After you apply the Word AXIS settings manually is formatted perfect!  I have 4 decimal places correct points for my data.

    NOW, the Question...

    How to use the "Set Word chart Font.vi" for formatting the axis with four decimals?

    I tried the combination of countless, and I can't seem to make it work.  I even called Tech OR supported and they have a little "shrugged" their shoulders and referred me to a file 'help '.

    I may have this wrong approach, but my goal is to use a 'model Word' and "To generate a report of Doc Word" without going through the user for formatting the chart MANUALLY.

    Here's a sample of what, in my view, have to work... but I can't seem to find a combination of work.

    Looking for suggestions!  Let me know what you think and I'll give it a try!

    Thank you very much!

    Doug

    I thought about it!

    The help file "Word Set Graph Font.vi ' is not too useful.  But I found the combination that works!

    Here is the example code that worked:

    What is difficult about the file "help":

    "(general) number format.  For me, I thought he was referring to categories of Word... THAT IS... General, number, currency, etc.

    "(general) number format" really means "Mask number format".  I replaced that with the type of mask, I tried '0.0000'

    'type (category) axis' still once, confuse another title.  The names of properties of word 'general, number, currency... etc.' as a 'category '.

    I tried all the combinations (3) using a 'constant'... but the use of these has caused the problem!  I REMOVED the entry for the vi!

    "index graph (-1)" once again the help file is missing explanation.  But it gives a little trick.

    This refers to the order of the graphic objects in your Word document.  In my model, I got the following:

    0 = header graphic

    1 = histogram one.

    2 = two histogram.

    I changed the graphic index to 2.

    I literally worked on this problem for days!  No sooner, I'll post my problems, I thought about it.

    Doug

  • WinHlp32 is no longer included with Windows

    I have a workshop of Jaguar (TIS) manual for which I installed ITC on my laptop which has Windows Vista as operating system.

    The 'help icon ' to give me complete operational instructions won't work.  He said: "the help for this program was created in Windows Help format, which was used in previous versions of Windows and is not supported in Windows Vista.  See "Windows Help program (Win HIp32.exe) is no longer included with Windows on the Microsoft support site.

    I can't find any information on it or in one of the forums.  Can someone help me please?

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/default.aspx

    Windows Vista Compatibility Center

    First thing to do is to check its Vista compatibility at the link above, and if not to see what patches/solutions are available from its manufacturer...

    See you soon.

    Mick Murphy - Microsoft partner

  • View all numbers with 2 decimal places.

    Hi all

    We have a requirement in our code where we want all numbers must be displayed to 2 decimal places.

    For example: If a number is 21.234 then it should be displayed as 21.23
    If a number is 21.289 then it should be displayed as 21,28
    If a number is 21 so it should be displayed as 21.00

    Can someone help me please how do in a SQL query.

    Kind regards
    Shruti

    Hi, Shruti,

    This shows a couple of things you can do:

    COLUMN     trnc     FORMAT     999999.99
    
    WITH     got_x     AS
    (
         SELECT     empno / 1000     AS x
         FROM     scott.emp
    )
    SELECT     x
    ,     TO_CHAR (x,            '999999.99')     AS tc
    ,     TO_CHAR (TRUNC (x, 2), '999999.99')     AS trnc_tc
    ,     TRUNC (x, 2)                              AS trnc
    FROM     got_x
    ;
    

    Output:

    `        X TC         TRNC_TC          TRNC
    ---------- ---------- ---------- ----------
         7.369       7.37       7.36       7.36
         7.499       7.50       7.49       7.49
         7.521       7.52       7.52       7.52
         7.566       7.57       7.56       7.56
         7.654       7.65       7.65       7.65
         7.698       7.70       7.69       7.69
         7.782       7.78       7.78       7.78
         7.788       7.79       7.78       7.78
         7.839       7.84       7.83       7.83
         7.844       7.84       7.84       7.84
         7.876       7.88       7.87       7.87
           7.9       7.90       7.90       7.90
         7.902       7.90       7.90       7.90
         7.934       7.93       7.93       7.93
    

    Column x is the number, such as SQL * more it displays by default. Note there is as many digits after the decimal point are needed.
    TC column shows how TO_CHAR can put in shape the number with exactly 2 digits after the decimal point. This automatically rounds the number nearest multiple de.01, so on the first line (for example) 7.369 gets displayed as 7.37.

    user11272043 wrote:
    ... If a number is 21.289 then it should be displayed as 21,28

    You (apparently) still want the number rounded to 0, then the tc column isn't quite what you want.
    Column trnc_tc is exactly what you asked for, with the number rounded to 0 (when a rouning is possible) and 2 digits after the decimal point.
    TC column is also exactly what you asked, but he uses the language SQL * Plus formatting rather than SQL. In addition, TRNC column is a NUMBER, while the column trnc_tc is a VARCHAR2, because TO_CHAR, as its name implies, returns a VARCHAR2.

    SQL * more order

    SET   NUMFORMAT  999999.99
    

    change the default format for all the number of columns. If you use it, you can ignore it for individual columns using TO_CHAR (since it returns a VARCHAR2, the FORMATNUM does not apply), or an order of the COLUMN. Also, if you use the VALUE FORMATNUM 999999.99, you must still explicitly TRUNC each number, otherwise 21.289 will come out as 21.29, 21.28. not.

  • Exporting data to Excel discoverer - keep the format for numbers options

    Is it possible to keep the format options when you export an excel spreadsheet.

    I formatted numbers with 2 decimal places and using the 1000 separator, but in great numbers do not have the 1000 separator. For some reason any.

    Thank you

    Oddie

    Oddie-

    When we export out of our 10.1.2.3 Discoverer Plus the instance as a Microsoft Excel (.xls) workbook and open results with Excel 2007, we can see the format exactly as it is in the Scout report.

    When the user first opens the workbook, they see two worksheets - we the unformatted data, and contains macros formatting. At the top left, there is a warning from security - Macros have been disabled, with the Options button. By clicking on the Options button gives a choice to 'enable this content '. Once the user clicks the OK button, the Excel export will be formatted as the discoverer of report.

    -Tracy

  • CarPlay & numbers with Extensions

    Hi all

    I have a question calling the phone numbers with extensions when connected to CarPlay. I have a lot of contacts with the extensions and phone numbers include a break and post numbers. Normally when you call these numbers using the phone only, or when you use a Bluetooth headset or Bluetooth in the car, the call connects, then composed the extension correctly to end the call.

    When I am connected to CarPlay and make the call through CarPlay, the call connects, but it is not dial and connect to the extension correctly. I even tried to add extra breaks, but it still does not work. Anyone else having this problem and have a solution?

    At this point, my only option is to disconnect the connection of lightning to CarPlay, wait for the phone to connect to the Bluetooth in the car, and then make the call using Bluetooth. It defeats the purpose of having CarPlay first.

    I use CarPlay in a Honda Accord from 2016 with an iPhone 7 running IOS 10. I had the same problem with my iPhone 6 s 9 IOS running.

    Update: genius of Apple confirmed this bug and asked newspapers to this question that I downloaded. If all goes well, they will have a fix in a future version of IOS 10. I'll give another update when I hear anything.

  • Compactheader add-on no longer works with Firefox 39?

    In my view the header that appears above the body of the email must be eliminated. That is possible because the Compactheader add-on is no longer compatible with Firefox 39. This header is redundant and just takes place of the screen anyway.

    Then you do not install it in Thunderbird.

    Download it to your computer where you can find it somewhere. Then, in Thunderbird, go to the page of add ons and click on the gear icon in the toolbar and select install from file.

  • e-mail no longer works with firefox

    Yahoo mail no longer works with firefox. but there is no problems with yahoo mail when I use chrome. This problem started a week ago. today is 02/07/15

    You can try the following steps in case of problems with web pages:

    You can reload webpages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and delete cookies only from Web sites that cause problems.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

Maybe you are looking for

  • Why my bookmarks open in a Panel to one side instead of the home page?

    Whenever I try to use a bookmark, I get a side panel opening on the left side of the screen with the bookmark page. There are scroll bars, but it is impossible to work with. I have to use the icon in the taskbar to open a second tab for the version f

  • Time Machine and Mail

    I'm on an imac with system 10.11.3. When I mail open and open the Time Machine all look at them I got back in time, and now it doesn't display my records from my mac. Has never done this before. Currently shows all records iMac 21.5 inch mid-2011 wit

  • For Satellite M30X-128 ATI drivers update

    Hello My Ati mobility radeon 9700 drivers are since August 2004. Where can I find an update?

  • Vista, sims 3 and I/O device

    It is not possible to install the sims3 in the computer.about 3/4 installation appaears "unabble to run due to fail in an I/O device"This failure came to D:\gamedate\shared\packages\fullBuild2.package laptop with sufficient memory capacity and no fai

  • Deployment of applications

    Hello I have a request that I developed using eclipse 3.4.1 whenever I run my application using the eclipse plugin, it works very well (the application has web services). but when I run my application using the standlone Simulator I can open Web page