+ Reply to Thread
Results 1 to 6 of 6

Vba code to 'trim' and 'convert numbers sorted as text to numbers'

  1. #1
    Forum Contributor
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    134

    Vba code to 'trim' and 'convert numbers sorted as text to numbers'

    Currently I am using 'Ablebits' addins for 'TRIM' AND 'CONVERT NUMBERS SORTED AS TEXT TO NUMBERS'
    but my licence of 'Ablebits' will expire soon.
    Can any one on this forum help me by providing vba code for 'TRIM' AND 'CONVERT NUMBERS SORTED AS TEXT TO NUMBERS' for sheet containing data in range A1 to U25000.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,382

    Re: Vba code to 'trim' and 'convert numbers sorted as text to numbers'

    Can you provide a workbook (before and after) to show what you mean?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    134

    Re: Vba code to 'trim' and 'convert numbers sorted as text to numbers'

    I am importing csv file to excel by VBA code. While importing csv to excel leading and trailing spaces are included in excel.
    also I have to convert -number-stored-as-text-to-number data format. Then only excel formulas work on data imported to excel..sample file is attached.
    Attached Files Attached Files
    Last edited by kv.singh; 08-02-2020 at 01:16 AM. Reason: mistake

  4. #4
    Forum Contributor
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    134

    Re: Vba code to 'trim' and 'convert numbers sorted as text to numbers'

    Please help.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Vba code to 'trim' and 'convert numbers sorted as text to numbers'


    Seems just a bad import setting but as you forgot to attach the source csv file
    so import again and well read & answer to the Import assistant …

  6. #6
    Forum Contributor
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    134

    Re: Vba code to 'trim' and 'convert numbers sorted as text to numbers'

    I was asking help to trim data(leading and trailing space) which were automatically included while importing csv file .
    No one on this forum answered my query. so I will try myself to find solution. I am closing this query by
    marking as solved. Thanks.

+ 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] English VB Code 100% Convert Numbers to Text.
    By Alkhader in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2023, 05:18 AM
  2. Formula or Code to Convert Numbers to Text Based on Value
    By xam99 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-28-2019, 06:15 AM
  3. Macro for trim forumla/ convert text to numbers
    By Peep_Show_Fan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2015, 09:37 AM
  4. convert numbers into text (need a piece of code)
    By YPotschie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2014, 09:46 AM
  5. [SOLVED] Convert all numbers stored as text or custom formatted to numbers &no decimals - 40 sheets
    By synses in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 01:46 AM
  6. [SOLVED] How do you apply the int() in VBA in order to convert numbers stored as text to numbers
    By djaurit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2012, 02:57 PM
  7. Convert numbers stored as text to numbers Excel 2000
    By Darlene in forum Excel General
    Replies: 6
    Last Post: 01-31-2006, 04:10 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