Enter carriage return in merged cell

JimmyC
3StarLounger
Posts: 382
Joined: 08 Feb 2010, 16:08

Enter carriage return in merged cell

Post by JimmyC »

I have been searching the internet for a solution and no luck. It may be my search terms as I originally thought that this was a "quick" question. Anyhow, I am using Excel XP on Win XP SP3.

I have a merged cell with land parcels in it. For example, the format is: 09-0000375.004 What is happening is that Excel is parsing the merged cell in between the parcel numbers. Is there any way to add a carriage control to force Excel to break the line where I want it too so that the parcel numbers are not split up? When I hit enter in the merged cell--Excel believes that I am done with the edit---I tried entering an ASC but that does not seem to work either.

All proposals / alternative work arounds are welcome. Thank you for your consideration....JimC

User avatar
HansV
Administrator
Posts: 78541
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Enter carriage return in merged cell

Post by HansV »

Press Alt+Enter to insert a line break.

BTW try to avoid merged cells as much as possible. If you ever want to run code to manipulate the worksheet, merged cells are very unpleasant to work with.
Best wishes,
Hans

JimmyC
3StarLounger
Posts: 382
Joined: 08 Feb 2010, 16:08

Re: Enter carriage return in merged cell

Post by JimmyC »

Hans,
Thanks for the code...I thought that I had tried this keystroke...but will do so again...Sometimes my big fat slow fingers fail me when two keys must be pressed simultaneously. I do try to avoid merged cells as I have learned this from you reading your posts over the years. But there are times---especially when you need the output to look like a professional report that I find that I must use a merged cell.

In this case, every cell in the row is single item and can fit comfortably within the column limits. There is one exception and its the parcel number. I could have only one parcel number---life is good---or I could have as many as eight parcel numbers---life is bad. In order to keep the column for the parcel numbers a reasonable length so that the report prints landscape on 8.5 x 11 paper, I "thought" that I had to use a merged cell.

The thing I find useful in a merged cell is that it automatically makes the row wider so that all cell data can be centered in the cell across the row. When I merely insert rows and only fill data in one column the printed report looks poor with all of the white space.

I could never think of another way to work around a cell that may contain one item or up to eight items in one column. It seems like over kill to use access for only one data element that could have a many to one relationship while all of the other cells have a one-to-one relationship. Does my general inquiry makes sense? Thanks

User avatar
HansV
Administrator
Posts: 78541
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Enter carriage return in merged cell

Post by HansV »

It's OK to used merged cells occasionally for a specific purpose. Just keep in mind that they can cause problems with copy/paste and with VBA.
Best wishes,
Hans

JimmyC
3StarLounger
Posts: 382
Joined: 08 Feb 2010, 16:08

Re: Enter carriage return in merged cell

Post by JimmyC »

Hans,
Thanks as always for the assistance and great advice. Take care.
JimC