Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have an excel sheet that I need to export into a certain format.
I will need to have it so each column will only export the first (x) amount of characters in each cell, then add a SPACE, then add the first (x) amount of characters from teh next cell. How do I do that? |
#2
![]() |
|||
|
|||
![]()
Hi, John-
Suppose your existing data is in a tab called Sheet1; cell A1 contains the text string ABCDE; cell B1 contains a number 12345. Insert a new tab in the workbook- for purposes of this example I used the default name Sheet2. In cell Sheet2!A1 enter this formula: =MID(Sheet1!A1,1,3)&" "&MID(Sheet1!B1,1,3) The result in Sheet2!A1 is "ABC 123". The MID function returns a portion of a string function that you indicate: in this example, it starts in Sheet1!A1 in column 1 and returns the first 3 columns. The ampersand in the middle is a concatenator that joins the results of different functions. Can you modify this example to fit your application? |
#3
![]() |
|||
|
|||
![]()
Forgot to mention: you can then export Sheet2 in the .TXT format of
your choice. |
#4
![]() |
|||
|
|||
![]()
Yeah, I might be able to use that. Thanks.
After testing it, I'll convert it into a macro. Thanks again! "Dave O" wrote in message ups.com... Hi, John- Suppose your existing data is in a tab called Sheet1; cell A1 contains the text string ABCDE; cell B1 contains a number 12345. Insert a new tab in the workbook- for purposes of this example I used the default name Sheet2. In cell Sheet2!A1 enter this formula: =MID(Sheet1!A1,1,3)&" "&MID(Sheet1!B1,1,3) The result in Sheet2!A1 is "ABC 123". The MID function returns a portion of a string function that you indicate: in this example, it starts in Sheet1!A1 in column 1 and returns the first 3 columns. The ampersand in the middle is a concatenator that joins the results of different functions. Can you modify this example to fit your application? |
#5
![]() |
|||
|
|||
![]()
Not very easy. See if this gets you started:
http://www.erlandsendata.no/english/...extexportfixed HTH. Best wishes Harald "johnfli" skrev i melding ... I have an excel sheet that I need to export into a certain format. I will need to have it so each column will only export the first (x) amount of characters in each cell, then add a SPACE, then add the first (x) amount of characters from teh next cell. How do I do that? |
#6
![]() |
|||
|
|||
![]()
John,
Here's a solution similar to that of Dave O. In a separate mirror sheet, in A1: =LEFT(Sheet1!A1, x) Copy this sufficiently down and across using the Fill Handle. Now write this sheet using the Text Write Program (a free Excel workbook) at www.smokeylake.com/excel. Set the field delimiter to a space. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "johnfli" wrote in message ... I have an excel sheet that I need to export into a certain format. I will need to have it so each column will only export the first (x) amount of characters in each cell, then add a SPACE, then add the first (x) amount of characters from teh next cell. How do I do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
exporting a chart to gif format using COM (Excel v11 and .net) | Charts and Charting in Excel | |||
File asks to update when no links were created | Links and Linking in Excel | |||
Using Jet to read excel file returns blank for last cell - sometim | Excel Discussion (Misc queries) | |||
format question when open csv file | Excel Discussion (Misc queries) | |||
Convert text file to MS_Excel | Excel Discussion (Misc queries) |