VBA to convert text to values

keith

Board Regular
Joined
Mar 3, 2002
Messages
88
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??
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Why not select your values, choose the Data | Text to Columns... menu command, and press [ Finish ]?
 
Upvote 0
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..
 
Upvote 0
Why don't you change the database query so it returns numeric data instead of text data?
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top