ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   alpha field getting turned into an exponential number (https://www.excelbanter.com/excel-programming/368430-alpha-field-getting-turned-into-exponential-number.html)

dkellison

alpha field getting turned into an exponential number
 
I have written an application that retrieves information and places it into
an Excel spreadsheet. I am having trouble with my Part Number field. For
example, the part number value is supposed to be 3067E17. But, that part
number is displayed as 3.07E+20 in the spreadsheet. Is there anything that I
can add to my application that would get the part number to display properly?
I have tried using NumberFormat = "@", but that did not help.

JK

alpha field getting turned into an exponential number
 
Have you tried using the NumberFormat = "@" BEFORE you actually put the
text into the cell? If not, give it a shot.

-JK

dkellison wrote:
I have written an application that retrieves information and places it into
an Excel spreadsheet. I am having trouble with my Part Number field. For
example, the part number value is supposed to be 3067E17. But, that part
number is displayed as 3.07E+20 in the spreadsheet. Is there anything that I
can add to my application that would get the part number to display properly?
I have tried using NumberFormat = "@", but that did not help.



dkellison

alpha field getting turned into an exponential number
 
I just tried using the NumberFormat = "@" before loading any data into the
cell and I still encounter the same problem.

Thanks for the repsonse.

dkellison


"JK" wrote:

Have you tried using the NumberFormat = "@" BEFORE you actually put the
text into the cell? If not, give it a shot.

-JK

dkellison wrote:
I have written an application that retrieves information and places it into
an Excel spreadsheet. I am having trouble with my Part Number field. For
example, the part number value is supposed to be 3067E17. But, that part
number is displayed as 3.07E+20 in the spreadsheet. Is there anything that I
can add to my application that would get the part number to display properly?
I have tried using NumberFormat = "@", but that did not help.




NickHK

alpha field getting turned into an exponential number
 
This works for me:
ActiveCell.NumberFormat = "@"
ActiveCell.Value = "3067E17"

Or, irrespective of the formatting:
ActiveCell.Value = "'3067E17"

NickHK

"dkellison" wrote in message
...
I just tried using the NumberFormat = "@" before loading any data into the
cell and I still encounter the same problem.

Thanks for the repsonse.

dkellison


"JK" wrote:

Have you tried using the NumberFormat = "@" BEFORE you actually put the
text into the cell? If not, give it a shot.

-JK

dkellison wrote:
I have written an application that retrieves information and places it

into
an Excel spreadsheet. I am having trouble with my Part Number field.

For
example, the part number value is supposed to be 3067E17. But, that

part
number is displayed as 3.07E+20 in the spreadsheet. Is there anything

that I
can add to my application that would get the part number to display

properly?
I have tried using NumberFormat = "@", but that did not help.







All times are GMT +1. The time now is 01:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com