+ Reply to Thread
Results 1 to 6 of 6

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

  1. #1
    Registered User
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    75

    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
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    40,520

    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!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    75

    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
    Registered User
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    75

    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
    5,080

    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
    Registered User
    Join Date
    10-30-2019
    Location
    GUJARAT,INDIA
    MS-Off Ver
    MS OFFICE 2016
    Posts
    75

    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. 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
  2. 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
  3. [SOLVED] English VB Code 100% Convert Numbers to Text.
    By Alkhader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2015, 07:59 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