View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Converting numeric Part No. to text

First, if your data consists of 16 digits (no other characters) and you already
have it in excel, then your data is bad.

Excel keeps track of 15 significant digits. Your 16 digit entries will always
end with a 0--that 16th digit has been lost.

You can format these number codes (Format|Cells|Number tab|Number (0 decimal
places, and no 1000's separator) to see all the digits.

If you preformat the cells as text, then anything you type in will be kept.

You can also prefix your entry with an apostrophe:
'1234123412341234
to treat your entry as text.

But if that 16th digit is important, you'll have to spend some time fixing them.



Taser wrote:

I have a column in my worksheet which contains 16-character part
numbers. Most of these part nos. have characters, and are formatted as
text; however, a small portion of them are completely numeric and are
recognized by Excel as numbers instead of text.

My attempts to convert the entry into text for just these numerics has
been fruitless. I've tried appending a single quote to the left, Str,
and CellFormat, all in VBA, and all that happens is that they're
turned to scientific notation, even though they show up as valid part
nos. in the formula bar.

Does anyone have any other ideas on how I could attack this problem?

Tony R.


--

Dave Peterson