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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging Cells in Excel 1

Status
Not open for further replies.

EuanPirie

Programmer
Apr 15, 1999
66
0
0
GB
I need to merge data stored in 3 columns in Excel 97 to form 1 column, with the data stored 1 line at a time. I can't think of anything off the top of my head, and Excel keeps overwriting the data when I try to merge it using the "Center and Merge" button.<br>
EG:<br>
<br>
Date is one field, Name is another and company is the final column. I want them to be layed out in 1 field as <br>
Date<br>
Name<br>
Company<br>
<br>
Any suggestions?
 
Sorry, but I've tried everything to create what you want including playing around with Table Pivoting. You might be better off creating the data in an Access database, then create a Report form using the format you need. It is much easier and faster.<br>
It is unfortunate that Excel doesn't let you cut and paste in a different sized cell with out overwriting subsequent data - this is basically what takes place when you merge and center.
 
Okay, there is a way to do this. It takes a wee little bit of work, but it's much better that hand formatting a billion fields! First, record a macro to insert a blank space (I assume it's needed) at the end of the date and name fields. To do this, perform the following:<br>
1. Go to the very first field in the spreadsheet (A1)<br>
2. Select Tools, Macro,Record New Macro. <br>
3. Give the macro a name, and select a letter to go into the CTRL box. (**Note: a macro is simply a recorded series of steps. The letter you put in the CTRL box allows you to simply press CTRL-'x' to execute the macro).<br>
4. Once you've told Excel to record, do the following:<br>
Press F2, Press the SPACE BAR, Press the RETURN key<br>
5. STOP recording the macro.<br>
6. Now for every cell, run the macro.<br>
<br>
To "merge" the cells: Insert a column that is only comma's after the company column. File, Save As, select Save as Type: Formatted Text (space delimited)prn. Now close the sheet. Reopen the sheet, and tell Excell that the sheet is delimited, select comma as the delimiter, and you now have merged cells with the data retained! (I warned you it was some work, but it's still quicker than retyping 1000 cells).<br>
good luck!<br>
Kimi
 
Try using the Replace function. This allows you to combine the contents of two cells. Obviously if you need to combine three cells you'll have to use it twice.<br>
<br>
Insert a column and enter your the replace() function to combine columns A & B. You'll have to keep adjusting until you get the proper settings. When done copy and paste values.<br>
<br>
Once this is set. Insert another column with another replace() function to combine your copy/pasted values with column C.<br>
<br>
I'm not sure of your exact circumstance, but I've done this procedure for several projects and it works well. <br>
<br>
LOL<br>
Chad
 
Lets say Date is in A1, Name is in B1, Company is in C1, and you want to put them together in D1.<br>
<br>
Formula in D1 should be:<br>
=Text(A1,"mmm dd, yyyy")&" "&B1&" "&C1<br>
<br>
Text(A1,"mmm dd, yyyy")Will convert the date to text in the form of MAR 1, 1999. Look in format&gt;cells&gt;date for other paterns. If you want dash or other character between sections put it between the &" "&.<br>
<br>
But for gods sake, Why would you want to do this??????<br>
<br>
Bob
 
Hey, it ain't for me! I have tried to tell my boss that it's silly, however, it is just the way she wants it. No amount of reasoning will make her see the light and, at the end of the day, she pays my wages.<br>
<br>
Thank you all for your help in this matter, it's been much appreciated.<br>
<br>
Euan.
 
Or you could just use the following formula:
=CONCATENATE(A1,B1,C1);
on an empty cell (E1 for example) and drag it as much as you need...

-= Alea jacta est! =-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top