+ Reply to Thread
Results 1 to 8 of 8

Code to replace comma with tab

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    41

    Code to replace comma with tab

    Hi All,
    I have the below code to export the Excel data in Text format and its working fine, Currently it is using Comma as delimiter whereas I need Tab as delimiter.

    Can anyone please help me out, I am new to Excel Macro's.

    Thanks in Advance.
    Om

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code to replace comma with tab

    I do not know where is your delimiter in your code, but the code for tab is chr(9)

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Code to replace comma with tab

    @ AB33,

    Hi AB33,

    You are too quick for me.

    I do not know where is your delimiter in your code
    Exactly what I found as well.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Code to replace comma with tab

    Hi,

    how about
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Registered User
    Join Date
    08-02-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Code to replace comma with tab

    yes, I know the code for tab but in my current code,not sure where to update it... Can we have a way to modify the code and force it to save with tab as delimiter.

  6. #6
    Registered User
    Join Date
    08-02-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Code to replace comma with tab

    The below code is calling listsetp and thereby to xllistseprator, however I looked up online and couldn't find a way to change it to specific delimiter.
    Please Login or Register  to view this content.

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Code to replace comma with tab

    Hi, momer,

    either

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Ciao,
    Holger

  8. #8
    Registered User
    Join Date
    08-02-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Code to replace comma with tab

    Hi HaHoBe,
    Please Login or Register  to view this content.
    I tried the above and seems to be working, however your's is perfrect/meaningfull.

    thanks a lot,
    Omer

+ 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. [SOLVED] Remove spaces and replace with comma.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2013, 01:01 PM
  2. Replace last comma in string of text
    By financegrl in forum Excel General
    Replies: 2
    Last Post: 09-26-2012, 03:57 AM
  3. Replace dot with comma with macro
    By Idde in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-15-2011, 09:07 AM
  4. Replace comma on dot
    By makbos in forum Excel General
    Replies: 5
    Last Post: 08-16-2010, 05:09 AM
  5. replace the comma separator to a dot and dot to a comma at the same time
    By barkiny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2010, 05:42 PM

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