![]() Make the width of column Z slightly narrower than the combined width of columns A and B.(Column Z should not be merged with anything, nor should it be marked as merged.) Ensure the text formatting of column Z is exactly the same as in the merged cell, with the exception of merging.In column Z (or some other column outside of your data table range, but not immediately adjacent), put a simple formula reference to column A, as in =A1.Merge the cells in columns A and B as desired.(These steps assume you are merging the cells in columns A and B, and that your data table only includes columns A through K.) The process is described in the following general steps. You do this by using a separate column that is created for the express purpose of setting row height. If you don't want to use a macro, you can fool Excel into setting the row height properly. Such a macro wouldn't be that trivial to create.) ![]() The macro could then reset the column width, merge the cells, and set the new row height. A good approach is to have the macro determine the column width of the merged area, unmerge the columns, set the first column to that width, and determine the row height required to AutoFit it. One way around the problem is to use a macro to set the row height to the desired height. Doing so, however, apparently has no affect-AutoFit seems to completely ignore merged cells in doing its magic. At first blush you may think that you can use the AutoFit feature (Cells | Format | AutoFit or Format | Rows | AutoFit) to adjust the height of the row in which the merged cell is located. If you subsequently merge that cell with an adjacent cell, even if the adjacent cell has text wrapping turned on, then the resulting merged cell's row height is not adjusted so that all the text is visible.Įxactly why Excel does this is unclear, but there is no intrinsic way around it-Excel just does it. He points out that if a cell is set with text wrapping turned on, that Excel automatically adjusts the row height for the cell so that all the wrapped text is visible. Ernie asked if there was a way for Excel to automatically adjust the row height in cells that are merged.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |