Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well even so, I just took a blank cell, recorded a macro of setting the
Selection.NumberFormat = "0.00" What I would do is loop through each cell in the desired range, if the text of the cell isnumeric then select the cell and change the numberformat to the desired format. Ie. For I = StartRow to EndRow If IsNumeric(Application.Cells(I, ColumnLocation).Text) = true then Application.Cells(I, ColumnLocation).NumberFormat = "0.00" end if Next I I also did a little investigation about ensuring that the data in the cell is actually numeric. If in the import it prepends the data with an apostrophe, you can use the RIGHT function to work only with the portion of the string that may or may not be numeric. You might also have to reset the cells.value to your newly discovered "number" instead of the text present. Some ideas, not perhaps a final answer, but somewhere to work from. Maybe someone else can help you further? Of course substituting "cherrynich" wrote: I tried that before I posted. You start recording and then convert one, then stop recording and look at the code, and there isn't any code. Thank you though. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup Error, how to convert Text to Number | Excel Discussion (Misc queries) | |||
convert number to text w/ error checking sign | Excel Worksheet Functions | |||
Convert a number formatted as text to a number in a macro | Excel Programming | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
convert decimal number to time : convert 1,59 (minutes, dec) to m | Excel Discussion (Misc queries) |