![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 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?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,030
|
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 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
It worked! Thank you so much!
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
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 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|