Exactly. And now the condition HP > 35 is taken into account, and everything is displayed correctly, as well as for the case when the number of summoned demons turned out to be greater than the maximum possible value. I didn't apply these conditions specifically for the summary table.
New version:
2. VLOOKUP limits the use to 6000; enter 6001 pits, and you will already get N/A. (with HP from 1 to 35)
3. Redundant "if" construction in calculating the number of demons. The structure looks something like this (I will describe it in the form of pseudocode for clarity):
IF (A>0 AND B>0)
{
IF (A>0)
{Return Formula1}
ELSE
{Return 0}
IF (B>0)
{Return Formula1}
ELSE
{Return 0}
}
ELSE
{Return 0}
4. In the large table (which shows the number of demons for the number of sacrifices from 1 to 600), there is no check for HP > 35... which is essentially an error.
PS: I couldn't figure out the last formula (for calculating the required number of sacrifices); it seems to be deliberately obfuscated :p, but it shows the style mentioned in point 3. It seems that you tested individual pieces of "if" statements and then inserted them inside others.