+ Reply to Thread
Results 1 to 4 of 4

Macro to covert Text to Numbers

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Macro to covert Text to Numbers

    I have written code to covert text to numbers, but the text is not being converted to numbers


    It would be appreciated if someone could amend my code


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,465

    Re: Macro to covert Text to Numbers

    Your macro has some errors in it which I have corrected below (see Note 1 below). Also, you should compare my code to yours to see what I changed (besides the indenting).
    Please Login or Register  to view this content.
    NOTE 1: Your sheet is named "Sheet1" not "Data" so I changed that in the code; you were missing a With statement; the quote marks around the "A" in your Cells object were the wrong kind of quote marks.

    NOTE 2: You have manually set the cells' horizontal alignment to "Left Align"... you should remove that.
    Last edited by Rick Rothstein; 02-10-2021 at 11:43 PM.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Macro to covert Text to Numbers

    Thanks for the help Rick

    I have noted your comments

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Macro to covert Text to Numbers

    Please Login or Register  to view this content.
    Rick touched on the fact that you were left aligned (not you as such but the data)

+ 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] Group of textboxes to covert numbers to HH:MM format
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2019, 05:26 AM
  2. Macro to covert text file into excel and format the file
    By boddulus in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-21-2016, 02:38 AM
  3. covert Number to text
    By Shi in forum Excel General
    Replies: 3
    Last Post: 09-14-2015, 06:50 AM
  4. [SOLVED] Covert text to zip codes
    By scokaw in forum Excel General
    Replies: 2
    Last Post: 10-17-2013, 07:10 PM
  5. Covert text to be a Formula
    By macky1730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-22-2010, 03:46 AM
  6. Covert text to time
    By maverick_abhi in forum Excel General
    Replies: 8
    Last Post: 07-28-2006, 08:30 AM
  7. [SOLVED] Covert text to Hyperlink
    By Eli Kedar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2006, 09:55 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