changing from character to value format

pjp

New Member
Joined
Apr 9, 2002
Messages
2
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?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,019
Members
448,938
Latest member
Aaliya13

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