Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have an excel file with 14 columns. I want to save this as a text file
with all columns 12 characters wide and those columns which are numeric to 3 decimal places. All other columns if empty should contain 12 spaces. Columns which contains alphas should be left justified; colmns containing numerics should be right justified. Is there an easy way to do this? Thanks Chris |
#2
![]() |
|||
|
|||
![]()
I'd use 15 helper columns.
Say your data is in A1:Nxxx I'd put this formula in O1: =IF(ISNUMBER(A1),TEXT(A1,"00000000.000"),LEFT(A1&R EPT(" ",12),12)) And drag to cell AB1. Then in the 15 helper cell AC1, I'd put this formula: =O1&P1&Q1&R1&S1&T1&U1&V1&W1&X1&Y1&Z1&AA1&AB1 Then I'd drag all 15 helper formulas down the rows I need. Finally, I'd select column AC and copy, start up NotePad and paste there. Then finally save to the text file from notepad. (Keep the formulas (hide the columns) if you have to do this over and over and over.) inquirer wrote: I have an excel file with 14 columns. I want to save this as a text file with all columns 12 characters wide and those columns which are numeric to 3 decimal places. All other columns if empty should contain 12 spaces. Columns which contains alphas should be left justified; colmns containing numerics should be right justified. Is there an easy way to do this? Thanks Chris -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Thanks Dave, I will try that
Chris "Dave Peterson" wrote in message ... I'd use 15 helper columns. Say your data is in A1:Nxxx I'd put this formula in O1: =IF(ISNUMBER(A1),TEXT(A1,"00000000.000"),LEFT(A1&R EPT(" ",12),12)) And drag to cell AB1. Then in the 15 helper cell AC1, I'd put this formula: =O1&P1&Q1&R1&S1&T1&U1&V1&W1&X1&Y1&Z1&AA1&AB1 Then I'd drag all 15 helper formulas down the rows I need. Finally, I'd select column AC and copy, start up NotePad and paste there. Then finally save to the text file from notepad. (Keep the formulas (hide the columns) if you have to do this over and over and over.) inquirer wrote: I have an excel file with 14 columns. I want to save this as a text file with all columns 12 characters wide and those columns which are numeric to 3 decimal places. All other columns if empty should contain 12 spaces. Columns which contains alphas should be left justified; colmns containing numerics should be right justified. Is there an easy way to do this? Thanks Chris -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA for Excel 2000 file is corrupt | Excel Discussion (Misc queries) | |||
Opening an Excel file | Excel Discussion (Misc queries) | |||
How save a lotus 2.2 file in excel and to open it in excel and pe. | New Users to Excel | |||
Excel file takes a long time to save | Excel Discussion (Misc queries) | |||
How do I save a file in excel with a preview? | Excel Discussion (Misc queries) |