+ Reply to Thread
Results 1 to 12 of 12

Unwanted comma is added when pasting values from Notepad into Excel 2016

  1. #1
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Unwanted comma is added when pasting values from Notepad into Excel 2016

    I have data from Notepad that I cut and paste into Excel. The notepad data has two data points, separated by a comma.

    The first value usually ranges from about -5 to 2500.
    The second value ranges from 0 to 400.
    In notepad, the values are always separated by a comma, with no space between values.

    When I paste the data into Excel the values all appear as in Notepad until the first data point reaches 1000. At that point, Excel adds a comma between the 1 and the three zeros.

    Example:
    Notepad.................... Excel
    1537,208 .................. 1,537,208

    So, when I attempt to perform a "text to columns" it doesn't separate the values as I intended.

    I ultimately need to separate the two data points into two separate columns of data.

    Example:
    Notepad.......................Excel Column 1........Excel Column 2
    1537,208......................... 1537 ...................... 208

    I've tried formatting the cells using various "number style" criteria, but so far no luck.

    As always any assistance will be greatly appreciated.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    I've tried formatting the cells using various "number style" criteria, but so far no luck.
    If the data is text, no amount of formatting will change that

    Have you tried to do T2C using Fixed Width, and then setting the "break" just after the comma?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Thanks for the reply.

    I just tried T2C using a break.

    The problem is that the first data points:....... 1,105 ...... has a comma after just one digit.

    As the values get higher ....... 123,235 ..... the comma is after the third digit.

    When it performs the T2C, the break is always after the first digit/first comma.

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    What if you change the format in Excel to not use 1000 commas before pasting it?
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    OK, try this...
    A
    B
    C
    9
    1,234,567
    1234
    234
    10
    123,456
    123
    123

    B9=--LEFT(A9,IF(LEN(A9)-LEN(SUBSTITUTE(A9,",",""))=2,5,3))
    C9=--RIGHT(B9,3)
    both copied down as needed

  6. #6
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Almost there. This is what I get using your format and my typical values:

    ........... A................B.............C
    9..... 1,591,022......159..........159
    10.... 1,601,061.....160 .........160

    What I need is:


    ............A.................B...............C
    9.......1,591,022..... 159............1022
    10 ....1,601,061......160............1061


    Let's assume my "B" column will always start at the number 1 and always end at 360 (i.e., 1,2,3,4,5,.....360), if that helps.
    And the "C" column will start with zero and increase to a value no larger than 3500, then decrease back to zero, if that helps (the highest value will always be a four digit number).


    Thanks again for you help.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Quote Originally Posted by Greenlight View Post
    Almost there. This is what I get using your format and my typical values:

    ........... A................B.............C
    9..... 1,591,022......159..........159
    10.... 1,601,061.....160 .........160

    What I need is:


    ............A.................B...............C
    9.......1,591,022..... 159............1022
    10 ....1,601,061......160............1061


    Let's assume my "B" column will always start at the number 1 and always end at 360 (i.e., 1,2,3,4,5,.....360), if that helps.
    And the "C" column will start with zero and increase to a value no larger than 3500, then decrease back to zero, if that helps (the highest value will always be a four digit number).


    Thanks again for you help.
    That was not what you 1st asked for...
    I ultimately need to separate the two data points into two separate columns of data.

    Example:
    Notepad.......................Excel Column 1........Excel Column 2
    1537,208......................... 1537 ...................... 208

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Try this...
    A
    B
    C
    9
    1,234,567
    123
    4567
    10
    123,456
    123
    3456
    11
    1,591,022
    159
    1022
    12
    1,601,061
    160
    1061

    B9=--SUBSTITUTE(LEFT(A9,IF(LEN(A9)-LEN(SUBSTITUTE(A9,",",""))=2,4,3)),",","")
    C9=--RIGHT(A9,5)

  9. #9
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    I'm sorry for not getting it right when I initially explained it. My last post is accurate.

    Notepad..............Excel C1....................Excel C2
    159,1022...............159.........................1022

    The 159 is actually an angle (1 to 360 degrees) and the 1022 is a linear displacement value associated with that angle.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    OK, you changed your request again...
    ........... A................B.............C
    9..... 1,591,022......159..........159
    10.... 1,601,061.....160 .........160
    What I need is:
    ............A.................B...............C
    9.......1,591,022..... 159............1022
    10 ....1,601,061......160............1061
    However, your latest explanation makes it easier to fix (I think)

    A
    B
    C
    13
    159,1022
    159
    1022

    B13=--LEFT(A13,FIND(",",A13)-1)
    C13=--RIGHT(A13,FIND(",",A13))

    If this still is not what you wanted, please give me a range of (accurate) samples to work from, and show what you want

  11. #11
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Still not right.

    ....A...........B.......C....
    130,25 130 #VALUE!
    131,35 131 #VALUE!
    132,49 132 #VALUE!
    133,66 133 #VALUE!
    134,86 134 #VALUE!
    135,108 135 35108
    136,132 136 36132
    137,158 137 37158
    138,185 138 38185
    139,215 139 39215
    140,246 140 40246
    141,280 141 41280
    142,315 142 42315
    143,352 143 43352

  12. #12
    Registered User
    Join Date
    06-02-2008
    Location
    Louisiana, the other LA
    Posts
    11

    Re: Unwanted comma is added when pasting values from Notepad into Excel 2016

    Actual data once it is transferred from Notepad to Excel


    1,0
    2,0
    3,0
    4,0
    5,0
    6,0
    7,0
    8,0
    9,0
    10,0
    11,0
    12,0
    13,0
    14,0
    15,0
    16,0
    17,0
    18,0
    19,0
    20,0
    21,0
    22,0
    23,0
    24,0
    25,0
    26,0
    27,0
    28,0
    29,0
    30,0
    31,0
    32,0
    33,0
    34,0
    35,0
    36,0
    37,0
    38,0
    39,0
    40,0
    41,0
    42,0
    43,0
    44,0
    45,0
    46,0
    47,0
    48,0
    49,0
    50,0
    51,0
    52,0
    53,0
    54,0
    55,0
    56,0
    57,0
    58,1
    59,2
    60,2
    61,2
    62,2
    63,2
    64,2
    65,2
    66,2
    67,2
    68,2
    69,2
    70,2
    71,2
    72,2
    73,2
    74,2
    75,2
    76,2
    77,2
    78,2
    79,2
    80,2
    81,2
    82,2
    83,2
    84,2
    85,2
    86,2
    87,2
    88,2
    89,2
    90,2
    91,2
    92,2
    93,2
    94,2
    95,2
    96,2
    97,2
    98,2
    99,2
    100,2
    101,2
    102,2
    103,2
    104,2
    105,2
    106,2
    107,2
    108,2
    109,2
    110,2
    111,2
    112,2
    113,2
    114,2
    115,2
    116,2
    117,2
    118,2
    119,2
    120,2
    121,2
    122,2
    123,2
    124,2
    125,2
    126,4
    127,7
    128,12
    129,17
    130,25
    131,35
    132,49
    133,66
    134,86
    135,108
    136,132
    137,158
    138,185
    139,215
    140,246
    141,280
    142,315
    143,352
    144,389
    145,428
    146,468
    147,509
    148,552
    149,594
    150,637
    151,680
    152,724
    153,768
    154,811
    155,855
    156,898
    157,940
    158,981
    1,591,022
    1,601,061
    1,611,099
    1,621,136
    1,631,173
    1,641,207
    1,651,240
    1,661,271
    1,671,301
    1,681,329
    1,691,355
    1,701,380
    1,711,403
    1,721,425
    1,731,447
    1,741,467
    1,751,485
    1,761,503
    1,771,520
    1,781,536
    1,791,550
    1,801,564
    1,811,578
    1,821,590
    1,831,601
    1,841,611
    1,851,621
    1,861,630
    1,871,638
    1,881,645
    1,891,652
    1,901,658
    1,911,663
    1,921,668
    1,931,672
    1,941,676
    1,951,679
    1,961,682
    1,971,684
    1,981,686
    1,991,688
    2,001,690
    2,011,691
    2,021,693
    2,031,693
    2,041,695
    2,051,696
    2,061,696
    2,071,696
    2,081,696
    2,091,696
    2,101,696
    2,111,696
    2,121,696
    2,131,693
    2,141,691
    2,151,688
    2,161,685
    2,171,681
    2,181,677
    2,191,672
    2,201,667
    2,211,661
    2,221,655
    2,231,647
    2,241,640
    2,251,631
    2,261,621
    2,271,612
    2,281,601
    2,291,590
    2,301,577
    2,311,563
    2,321,548
    2,331,533
    2,341,516
    2,351,499
    2,361,480
    2,371,459
    2,381,438
    2,391,416
    2,401,394
    2,411,370
    2,421,345
    2,431,319
    2,441,291
    2,451,262
    2,461,232
    2,471,201
    2,481,169
    2,491,136
    2,501,101
    2,511,065
    2,521,028
    253,989
    254,949
    255,908
    256,867
    257,824
    258,781
    259,738
    260,694
    261,650
    262,607
    263,563
    264,520
    265,479
    266,438
    267,398
    268,359
    269,321
    270,285
    271,249
    272,217
    273,186
    274,159
    275,134
    276,112
    277,94
    278,79
    279,66
    280,56
    281,48
    282,42
    283,37
    284,33
    285,29
    286,26
    287,24
    288,21
    289,19
    290,17
    291,16
    292,14
    293,13
    294,11
    295,10
    296,9
    297,8
    298,8
    299,7
    300,7
    301,7
    302,7
    303,7
    304,7
    305,7
    306,7
    307,7
    308,7
    309,7
    310,7
    311,7
    312,7
    313,7
    314,7
    315,7
    316,7
    317,7
    318,7
    319,7
    320,7
    321,7
    322,7
    323,7
    324,7
    325,7
    326,7
    327,7
    328,6
    329,6
    330,6
    331,6
    332,6
    333,6
    334,6
    335,6
    336,6
    337,6
    338,6
    339,6
    340,6
    341,6
    342,6
    343,6
    344,6
    345,6
    346,6
    347,6
    348,6
    349,6
    350,6
    351,6
    352,6
    353,6
    354,5
    355,4
    356,3
    357,2
    358,1
    359,0
    360,0

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2016 upgrade added password
    By laguna92651 in forum Excel General
    Replies: 0
    Last Post: 12-22-2015, 07:01 PM
  2. Change comma to semicolon in Excel 2016 (Macbook)
    By enigma304 in forum Excel General
    Replies: 3
    Last Post: 11-24-2015, 03:56 PM
  3. Excel to notepad pasting values not in next line
    By vinay krishna in forum Excel General
    Replies: 1
    Last Post: 06-24-2015, 01:23 AM
  4. Copy-Pasting values into Notepad, then saving it
    By aijp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-19-2013, 02:55 PM
  5. Pasting Excel data to Notepad
    By butcher11 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-09-2013, 04:28 PM
  6. Pasting content from Excel to Notepad
    By kandanuru in forum Excel General
    Replies: 1
    Last Post: 10-31-2012, 02:35 AM
  7. pasting text from notepad not appearing in excel
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2012, 04:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1