Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 2003 on Windows Vista
I have data like "205", "444", "012", "007", "000" which I want to display in a column. By default, Excel displays them right-justified as 205, 444, 12, 7, 0. I want them right-justified as 205, 444, 012, 007, 000. I use With Columns(5) .NumberFormat = "@" .HorizontalAlignment = xlRight End With Each cell is marked with a green triangle at the top left corner, which I understand means "number defined as text". I want to eliminate those triangles. Prefixing each value with a quote works. e.g. write "000" as "'000". I found this advised, but have no reference to a relevant help entry. I prefer not to alter the data Unchecking "Tools\Options\Number stored as text" is more than I want. I saw Range("A1").Errors(xlNumberAsText).Ignore = True somewhere. Columns(5).Errors(xlNumberAsText).Ignore = True gets a 1004 error. For Each X In Range("E1", "E" & Cells.SpecialCells(xlCellTypeLastCell).Row) X.Errors(xlNumberAsText).Ignore = True Next works, but seems unreasonable. Errors seems to apply only to a single cell range. Why? I had no solution when I started writing this. ;( I now need understanding. ;) -- Walter Briscoe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell format text and data displayed like a number | Excel Programming | |||
Text not fully displayed when text direction changed | Excel Discussion (Misc queries) | |||
Count number of times a specific number is displayed in a cell ran | Excel Worksheet Functions | |||
Count number of times a specific number is displayed in cells | Excel Programming | |||
data imported into EXCEL as text displayed as exponential number | Excel Programming |