Is there a specific limit to how long a formula can be and what is considered to be the limit?

by Tam H.   Last Updated July 11, 2019 23:03 PM - source

I am currently taking a course that involves Google Spreadsheets and was wondering if there was a specific limit to how long a formula can be in one cell and how many functions are the max. I am looking at a formula I have created and it gives me the error #ERROR "Formula parse error." the formula and functions I am using are,

=IF(AND(C4="K",E4=0),"S",IF(AND(C4="K",E4=4),"K",IF(AND(C4="S",E4=2),"K",IF(AND(C4="S",E4=0)"S",IF(AND(C4="OUT",E4=1),"N/A",0)))))

very complicated, I know. Although I'm not quite sure how else to do it.

If someone could help me out with that, that'd be amazing.

Tags :

A formula can be long 50000 characters. After that, you will receive:

There was a problem
Your input contains more than the maximum of 50000 characters in a single cell.

However, there is a nice workaround that allows you to exceed this limit: https://stackoverflow.com/a/55070275/5632629

As for the "used functions" - no such limit.

As for your formula - try it like this:

=IF(AND(C4="K",   E4=0), "S",
IF(AND(C4="K",   E4=4), "K",
IF(AND(C4="S",   E4=2), "K",
IF(AND(C4="S",   E4=0), "S",
IF(AND(C4="OUT", E4=1), "N/A", 0)))))