简体   繁体   English

excel在单元格中x个字符后自动插入文本

[英]excel automatically insert text after x amount of characters in cell

I have a long excel formula that exceeds the 255 character limit that excel allows in a single cell. 我有一个很长的excel公式,超过了excel在单个单元格中允许的255个字符的限制。 I get around this by adding "&" after every 255th character so that the next parts of the formula are concatenated to the previous. 我通过在每第255个字符后添加"&"来解决此问题,从而使公式的下一部分与上一个部分串联。

 ="text...text"&"text..text"&ROWS(A$1:A1)&"text...text"&"text...text" and so on

I would like to add to a piece of code to my formula in order to do this automatically. 我想在公式中添加一段代码,以便自动执行此操作。

Many thanks in advance. 提前谢谢了。

In Excel 2010 255 characters is the limitation on a column's width. Excel 2010中 ,列宽度限制为255个字符。 The cell limit is 32,767 characters. 单元格限制为32,767个字符。

Conventional ways to address such limits include text wrapping and inserting text boxes. 解决这种限制的常规方法包括自动换行和插入文本框。 Merging cells is another solution but not recommended. 合并单元格是另一种解决方案,但不建议这样做。

Since formulae are mentioned, the normal limit of what is readily visible in the formula bar of around 200 characters can be extended either by scrolling or expanding the formula bar (in both cases using arrows on the extreme right) or dragging its lower boundary. 由于提到了公式,因此可以通过滚动或展开公式栏(在两种情况下都使用最右端的箭头)或拖动其下边界来扩展大约200个字符的常规限制。

In the formula bar Alt + Enter may be useful to insert line breaks so that repetitive elements of a complex formula are lined up for comparison. 在公式栏中, Alt + Enter可用于插入换行符,以便将复杂公式的重复元素排成一行以进行比较。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM