Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: VBA to convert text to values

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a database that drops data into a spreadsheet column. When the data comes in it is all values but in text format 3,5,25,1 etc.. When I sum the cell values it returns 0 instead of adding the values because it sees them as text. What I need is a macro I can run to go down the entire colum and convert from text to real numbers.. any help??

  2. #2
    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

    Why not select your values, choose the Data | Text to Columns... menu command, and press [ Finish ]?

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I can try to record a macro that does that.. but I am not the user of the sheet so I have to get it done automatically when the user refreshes the database query..

  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

    Why don't you change the database query so it returns numeric data instead of text data?

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
  •