+ Reply to Thread
Results 1 to 10 of 10

Remote extra commas from Column

  1. #1
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Remote extra commas from Column

    Hi members,

    I am looking for VBA code to remove extra commas from d column.


    Missing
    , , , 1617614,
    , , , 1676652,
    , , , , 1676664, 1676665, 1676666, , 1676668, , 1676670
    , , 1591813,,,,
    , , , 1591113,


    your help may appreciated.


    Regards,
    Nandkumar S.
    Last edited by satputenandkumar0; 07-21-2014 at 08:26 AM. Reason: Table Adjustment

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Remote extra commas from Column

    Please Login or Register  to view this content.
    Not tested as not in Excel.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remote extra commas from Column

    its easy enough with just a formula
    =SUBSTITUTE(TRIM(SUBSTITUTE(d2,","," "))," ",", ")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Remote extra commas from Column

    Nice one Marin

  5. #5
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Remote extra commas from Column

    Dear nathansav,

    Thanks for reply. It is showing 'Syntax error' on below line

    Please Login or Register  to view this content.
    Regards,
    Nandkumar S.

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Remote extra commas from Column

    strOP = strOP & "," & a(i)

    You can have a go at fixes yourself

  7. #7
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Remote extra commas from Column

    Dear Martin,

    It works perfect. But I am looking for VBA code because I am getting these values (in D column) with macro.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remote extra commas from Column

    or use the worksheet function
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Remote extra commas from Column

    Dear nathansav,

    It is not showing error now, but clearing all contain.

    Please find attached file

    Regards,
    Nandkumar S.
    Attached Files Attached Files
    Last edited by satputenandkumar0; 07-21-2014 at 08:51 AM.

  10. #10
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Remote extra commas from Column

    Thanks Martin,

    Your solution works like a charm.
    Thanks nathansav

    Regards,
    Nandkumar S.

+ 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. Convert to CSV , extra commas displaying
    By yashu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2013, 08:49 PM
  2. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  3. Create CSV without extra Commas
    By naveenkharb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2010, 10:56 AM
  4. how to stop excel from adding extra inverted commas?
    By podcast in forum Excel General
    Replies: 1
    Last Post: 07-27-2007, 06:49 PM
  5. Extra trailing commas in exported CSV
    By lucidr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2006, 08:40 AM

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