Converting Excel Data into Text File with fixed column position - excel

I have an excel file with having a table (Customer Detail) with three columns.
First Column: Name Of the Customer
Second Column : Attention Line of the Customer
Third Column : City, State , Zip of the Customer
The table contains about 100 rows.
I want to export that table values in a text file. But my problem is that when I copy/paste in the text file or save as a .txt format the column values don't remain in fixed positions. I want the text file with each column values left aligned and first letter or number for each column should remain in fixed position.
Thanks in Advance!
NOTE: I am using Microsoft Excel 2010

Try Save As - Formatted Text (Space Delimited) (*.prn). It should detect the width and insert spaces for you

Related

How to merge two cells in CSV file

How to merge two cell in CSV file like as Excel?
I want to merge two cell in CSV file file as:
Header Id Name mobileNo
Sub-Header id first Name last Name countryCode MobNumber
This is not possible
A comma-separated values (CSV) file stores tabular data (numbers and
text) in plain text.
It is just data, with no attached formatting or knowledge of how the
cells should be merged when the data is imported.
You could use a script maybe like python to merge them, refer this link
https://dzone.com/articles/merging-cells
You can just keep on adding comma's after a text in one cell to merge it with other cells. It did work for me at least.

Excel apply formula after pasting table

Is there a way to create an excel template, which automatically applies a formula if a certain column is inserted? The use case would be:
User copies a table from a desktop program (CSV or Tab separated)
Pastes the table into the excel template
Somehow the column's header gets matched (header's name is fixed)
Multiply the column values with a fixed value (like 1.25)
The problem is that the column could be in different indexes and the formula should apply to all the rows, not just fixed ones, but my main problem is how can I get a copy-paste event and find the column.
Edit.: I can only do this with VBA (never used it before)?
Assuming the column header is constant you could insert a table with "dummy" headers and a calculated column using the header name as a reference
In the example I have put a formula in the Calc column. I've put the Calc in column G assuming your maximum import columns are six and because it's good practice to do your calculations from left to right.
You could move the Calc to column A and reduce the "dummy" columns to just 1 with whatever your desired heading is.
To make a template, delete row 3 and clear out the dummy data, just leaving the calculation(s) and save as a .xltx in your profile template folder (wherever that may be in your versions of Windows/Office).
When you paste in your import data the table will extend down and copy the formula(s) automatically. If you have moved your calculation(s) to the left of the table, the table will resize to the right to accommodate all your imported columns.
While the MyHeader column in your template may be over-written, if it can still be found in `Table2[#Headers] the formula will still work.

COPYING values from EXCEL sheet_1 COLUMNS and PUTTING as (comma separated) into EXCEL sheet_2 ROWS

I have an EXCEL sheet_1 like i.e.
and I want output in another EXCEL sheet_2 in this form i.e.
All is what I want to delete multiple rows with same aid and to put all the non-zero values (comma separated) in single cells of each columns named i.e. 1990 - 1994, 1992 - 1996.....so on against each aid i.e. 2937, 11120, 12403......and so on.
Please help. Thanks!
http://www.extendoffice.com/documents/excel/2723-excel-concatenate-based-on-criteria.html Not the specific code but similar solution. Just customize according to your need.

Move data from ColB and ColC beneath data in ColA

I tried looking up what I need to do, but I'm not very good with Excel, so I'm not sure how to search for what I'm attempting to do.... here it goes...
I have a file that a customer sent me that I need to export as a .csv for direct mailing. What she sent has all 1463 customer names down column A, their address in ColB, and the second address line in ColC. The program that I need to import the .csv file into needs all of the information in one column so that it reads as you might read an address on an envelope, with the entire name and address in one cell (one cell per entry). So I need to take the data in column C and move it underneath the data in column B, then take that data and move it underneath the name data in column A.
Side note: The third address lines did have a comma between the city and state, but I have already gone through and removed them, since I know that the file will not export correctly with a comma in the data in a .csv file.
Using Excel 2010 on Windows 7.
Assign the formula into cell C1, you can use =CONCATENATE(A1,CHAR(10),B1) or =A1&CHAR(10)&B1
Copy cell C1 and paste it for all required rows in C column
Right click on C column header and choose Wrap Text
Adjust the size of C column so that all lines shown in full
If you save in CSV, you will be asked to confirm features not compatible. If you agree, you need to repeat step 3 two times (Unwrap then Wrap it again) and step 4 if you open this file again. The formula will be gone. I suggest to save in either xls or xlsx format.

How to check if two rows are identical and contain the same data in a list of rows

I have a list of lines in the D column and every line has a few properties in columns I, J, K and so on. I want to check my list if any rows contain the same properties and same line number. I want to delete the identical row and all the information in the columns. I'm new to VB so have no idea where to begin. My Sheet is called "Sheet1" and the column begins at D30 and goes to the right up until column AK30. The row begins at 30 and goes down to 7000. If anyone could help me with this it would much appreciated.
Thanks
My idea is use something very similiar to the used in
this post:
Add a new column where you "Concatenate" all the paremeters to be checked in the row.
Seleect all your data and "Remove Duplicates" that appear based in the column with concatenated results.
concatenate is a formula to string together the input values, where Remove Duplicates is self explanatory and is under Data tab in the Data Tools subtab (in excel 2007).
Regards

Resources