#1   Report Post  
Marcin Gajek
 
Posts: n/a
Default CSV/Text formatting

Hello

I have Excell 2003 on WinXP Home edition.
In column A1 I have value 107, I need 00107 and i need it saved in .CSV
format. I'm converting columns to TextFormat
and excel accepts it but when i want to save it in Csv format i say
something about loosing some formatting. I HAVE to
save file in CSV format with values in column A 00107 not 107...please help
me !

Thank you.


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default


For Each cell In Range("A1", Range("A1").End(xlDown))
cell.NumberFormat = "@"
cell.Value = Format(cell.Value, "00000")
Next cell


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Marcin Gajek" wrote in message
...
Hello

I have Excell 2003 on WinXP Home edition.
In column A1 I have value 107, I need 00107 and i need it saved in .CSV
format. I'm converting columns to TextFormat
and excel accepts it but when i want to save it in Csv format i say
something about loosing some formatting. I HAVE to
save file in CSV format with values in column A 00107 not 107...please

help
me !

Thank you.




  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

If the cell is formatted as text and contains the txt 00107, it WILL be
exported that way. You can check that is you open the file in Notepad or
Wordpad. The the leading zeroes are lost when you OPEN the CSV file in Excel.
With the CSV format, you have no control over the format of the columns. To
get around this, you should save the file as TEXT with a tab delimiter. Then,
when you open it again, you get the Text File Wizard and can specify that this
column is text.

On Fri, 25 Mar 2005 13:04:05 +0100, "Marcin Gajek"
wrote:

Hello

I have Excell 2003 on WinXP Home edition.
In column A1 I have value 107, I need 00107 and i need it saved in .CSV
format. I'm converting columns to TextFormat
and excel accepts it but when i want to save it in Csv format i say
something about loosing some formatting. I HAVE to
save file in CSV format with values in column A 00107 not 107...please help
me !

Thank you.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"