In Excel, 2010 or any other version probably, if I enter in a cell, a long single-line text that is longer than the width of the cell, Excel sometimes render the text across the next adjacent cells; some other times, it gets cut off at the boundary with the adjacent cell to the right. I would like to know how does Excel decides what to do, so I can better control my layouts. Note that I do not want to use merge cells, as it is inapproperiate at times. ![]() ![]() Also, I already tried 'Clear All' formatting on all affected cells but still doesn't seem to reveal much. For text to overflow beyond the edge of a cell, the following conditions must be true: • The cell does not have 'Wrap Text' turned on • The cell is not a merged cell • The cell contains a value that exceeds the width of the cell • The adjacent cell is empty* and not a merged cell • The cell has any of the following horizontal alignments: • General • Left (Indent) • Center • Right (Indent) • Center across selection (Right overlaps the cell to the left; center overlaps on both sides.) • The cell contents are not rotated (i.e. Orientation is set to 0°) (Excel 2010 only?) • The cell contains a text value. Numerical and date values get converted to ####, or to scientific notation, instead of overlapping adjacent empty cells. • The worksheet does not have 'Show Formulas' turned on I believe these are all the necessary conditions. If I have missed any, please feel free to edit this answer. * In certain circumstances, an adjacent cell can appear to be empty, but not be, in which case the text will not overflow into that cell, because it is not truly empty. I have experienced this same issue, and it only applies when the value in the cell is all numeric characters (including decimal point), if the value in the cell has any alpha characters in it, it does properly expand into adjacent cells, but when the value is numeric only it does not. This is true even if you change the format of the cells to Text after the number was entered into the cell. To fix this I had to pre-format the cells to Text in Excel and then paste the data into the text cells using paste special - values. Another solution is to put a single quote in front of a number and Excel will treat it as text, allowing it to display in the adjacent cell. I do not recommend using clear all (unless you want to lose your work!). Excel (2013 at least - not sure about earlier versions - although I'm pretty sure 2000 didn't act this way) recognises an empty string (i.e. ') as a value and so even if you have an 'empty' adjacent cell, your data will not overflow into that cell. What is required in the cell is a null - I imagine this has been adopted in Excel in order for it to be more aligned with databases, where empty strings and nulls are very different things. Selecting the cell and hitting delete will actually place a null in there. Eprint app for mac. However if you have a large spreadsheet, or for some reason your spreadsheet's cells often get populated with empty strings, then a quick solution is to write a macro that checks for empty strings (') and replaces them with nulls.
0 Comments
Leave a Reply. |