Search code examples
google-sheetsconcatenationgoogle-sheets-formulatextjoin

Is there any formula length limitation in Google Sheets?


I'm trying to create a data array from multiple cells in one cell and fail:

My data is placed in cells from A3 to A3000. I try to paste into A1 the formula like =A3&"|"&A4&"|"&A...&"|"&A3000. The length of this formula is 29.345 characters - fewer than the limit of 50.000 characters à cell.

But just after pasting of formula into A1 I get an error from Google Sheets "Can't load the file. Try later or send bug report".

The only thing I suppose is, that there are some different limits for the length of formulas, then they are for the strings... Or does somebody know, what happens here and how could I overcome this error?


Solution

  • Is there any formula length limitation

    yes there is but it can be surpassed - https://stackoverflow.com/a/55070275/5632629 so far my longest formula had 422 379 characters

    are you sure you need to do it like that (unclear from your question) instead of just:

    =TEXTJOIN("|", 1, A3:A3000)
    

    or maybe even like (it really depends on what you want to do next):

    =QUERY(A3:A3000,,999^99)
    

    or perhaps:

    =ARRAYFORMULA(A3:A3000&"|")