Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Number Formatted As Text": How To Avoid?
I'm populating a worksheet with various types of data.
A couple of columns are different types of CUSIP. e.g. --------------------------------------- 5180 Case mFieldID_CUSIP_144a 5181 mColNum_CUSIP_144a = curCol 5182 With .Columns(curCol) 5183 .ColumnWidth = mColWid_CUSIP 5184 .NumberFormat = "@" 5189 End With --------------------------------------- Most CUSIPs are alphameric, but a few are all numeric. e.g. "774272207" For those few, the populated sheet shows that little green triangle in the upper left of the cell and clicking it pops a micro-dialog whose MouseOver presents "The number in this cell is formatted as text or is proceeded by an apostrophe". Is there any way for me to avoid inflicting that little chain of events on the user? -- PeteCresswell |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Number Formatted As Text": How To Avoid?
Could you just format the range as General and let the CUSIP be numeric or text
just as they are?? Or if it's numeric and have to have a certain number of digits, give it a custom format like: 000000000. Or you could turn off that error checking with something like: Application.ErrorCheckingOptions.NumberAsText = False "(PeteCresswell)" wrote: I'm populating a worksheet with various types of data. A couple of columns are different types of CUSIP. e.g. --------------------------------------- 5180 Case mFieldID_CUSIP_144a 5181 mColNum_CUSIP_144a = curCol 5182 With .Columns(curCol) 5183 .ColumnWidth = mColWid_CUSIP 5184 .NumberFormat = "@" 5189 End With --------------------------------------- Most CUSIPs are alphameric, but a few are all numeric. e.g. "774272207" For those few, the populated sheet shows that little green triangle in the upper left of the cell and clicking it pops a micro-dialog whose MouseOver presents "The number in this cell is formatted as text or is proceeded by an apostrophe". Is there any way for me to avoid inflicting that little chain of events on the user? -- PeteCresswell -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CSV file doesn't save "xEy" style number as text formatted data | Excel Discussion (Misc queries) | |||
VLOOKUP using a number as text to "lookup" a match formatted in a | Excel Worksheet Functions | |||
Text formatted as "General" in Excel 2002. How do I avoid that? | Excel Discussion (Misc queries) | |||
macro for converting number stored as "text" (or preceeded with ') to "number" formatting | Excel Programming | |||
cells formatted to tick when text value "Y" if or null if "N" | Excel Discussion (Misc queries) |