Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load data in Excel

Status
Not open for further replies.

AtomicWedgie

IS-IT--Management
Jul 10, 2002
227
NL
Hello,

I have a result from a query which I want to load into an excel file. The problem is that in my result I have an 18-digit number. Excel reads this as a number (1.9098090920-E09 or something) but it should regard it as text. Is it possible to create the query in such a way that Excel regards the number as text?

I have already tried it by putting a ' in front of the number but Excel will then show it as '67654567898765432456 and not 67654567898765432456

Regards,

Atomic Wedgie
 
try adding a space at the end of the text...

Known is handfull, Unknown is worldfull
 
hmm,

i guess then the best forum for this would be the Microsoft Excel forum dude...

Known is handfull, Unknown is worldfull
 
When you import data into excel it sets everything as general. To fix your problem highlight the column and change it to a number with no decimals

You can write a macro to do it.

Code:
    Columns("A:A").Select
    Selection.NumberFormat = "0"
 
Remember to change column "A:A" to the actual column of your choice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top