简体   繁体   中英

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. I get around this by adding "&" after every 255th character so that the next parts of the formula are concatenated to the previous.

 ="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. The cell limit is 32,767 characters.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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