"Number Formatted As Text": How To Avoid?

P

(PeteCresswell)

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?
 
D

Dave Peterson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top