Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: changing from character to value format

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a file with data that came from another source (I don't know where). The problem is that the numbers are not displayed as values. But if I hit edit (F2) and then hit enter, the cell contents change from a character to a value. However, I need to do this for about 4000 lines of data. I am not that familar with macros, but I was able to create a macro to perform that sequence, but how do I make it repeat it for 4000 rows and then stop?

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,308
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hiya,

    I'm still fairly new to VBA but I have what might be another solution to your problem.

    Type a 0 in a cell already formatted as a number, copy that cell, select the range of imported numbers, editpaste specialadd. That should automatically convert the range to numeric data (instead of text).

    Hope that helps,
    Adam

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It worked! Thank you so much!

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could have also used the Data | Text to Columns... menu command. And, BTW I wouldn't use "format" in this context. Instead, I'd use "data type" which includes: numeric, string (or text), boolean, and error.

    [ This Message was edited by: Mark W. on 2002-04-10 14:37 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •