+ Reply to Thread
Results 1 to 8 of 8

VBA to convert a range from numbers to numbers stored as text (Text to Columns)

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Hello,

    I manually convert all numbers to "numbers stored as text" by using Text to columns. I wondered if we use VBA to make it more automatic.

    I would need a range starting from cell A17 to last data in the same column to convert to numbers stored as text.

    Please help.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Try this code (Change the range to suit)
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Thank you for your code. However, the result that I wanted was in reversed. I wanted the numbers to convert into text instead.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Try this code
    Please Login or Register  to view this content.

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

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Numbers to text.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    I tried and it did not change the numbers into text. Must be something not working

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

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Record a macro and see what you get.
    You can also do on a single cell.
    Range("A1") = "'" & Range("A1")

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: VBA to convert a range from numbers to numbers stored as text (Text to Columns)

    Have a look at this code
    Please Login or Register  to view this content.

+ 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] Marco to convert numbers stored as text to numbers and dates stored as text to numbers
    By a2424 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-22-2014, 10:19 AM
  2. [SOLVED] Convert numbers stored as text to numbers for range of data that changes
    By excel2425 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 01:57 PM
  3. [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
  4. [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
  5. Replies: 2
    Last Post: 10-22-2009, 02:50 PM
  6. 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
  7. [SOLVED] How do I convert numbers stored as text with spaces to numbers
    By Baffuor in forum Excel General
    Replies: 1
    Last Post: 05-24-2005, 03:06 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