+ Reply to Thread
Results 1 to 5 of 5

Number stored as text error, convert to number script

  1. #1
    Forum Contributor
    Join Date
    06-26-2014
    Location
    Houston
    MS-Off Ver
    365
    Posts
    201

    Number stored as text error, convert to number script

    I am trying to write a script to fix the "number stored as text" error, but when I record a macro, it does not capture the steps. Has anyone experienced this, or have thoughts on code that will accomplish it?

    Specifically, I mean when the green triangle indicator shows up, and gives the yellow triangle button with a menu of options, one of them being Convert to Number. The cell does not actually change to a number format, it stays general, but the error goes away, and the numbers can now be used with formulas.
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Number stored as text error, convert to number script

    Hello..
    If they are all integers, all you have to do is select them and do:

    Selection.TextToColumns Destination:=Selection(1)
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  3. #3
    Forum Contributor
    Join Date
    06-26-2014
    Location
    Houston
    MS-Off Ver
    365
    Posts
    201

    Re: Number stored as text error, convert to number script

    Found a solution, in case anyone comes across this in the future.

    When the cells you need to apply this to are selected, the below code worked for me.


    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-26-2014
    Location
    Houston
    MS-Off Ver
    365
    Posts
    201

    Re: Number stored as text error, convert to number script

    Thank you!

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Number stored as text error, convert to number script

    Oh... "We bumped our heads when publishing our posts."

    Thanks for the +rep.

+ 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] Macro to convert Number Stored as Text and Format in appropriate Currency Formats
    By sameer79 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-28-2020, 03:07 PM
  2. Number Stored as Text -> Convert to Number
    By ppayjj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2019, 01:57 PM
  3. [SOLVED] VBA convert number stored as text to number
    By Littlesimon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2017, 09:54 PM
  4. [SOLVED] Text stored as number when copied from one sheet to another, Auto convert required
    By A440 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2016, 09:06 AM
  5. Macro - Convert stored text to number
    By adste89 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-19-2013, 09:19 AM
  6. Replies: 1
    Last Post: 10-28-2012, 05:42 AM
  7. [SOLVED] how do i convert a number stored as text to a numb in a vba loop
    By bobm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-27-2010, 05: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