# How this works (=SUMPRODUCT(MAX(ROW($C$52:$C$190)*($C$52:$C$190<>"")))) [closed]

This is the first time I have asked a quetion. I searched the community about finding the last occupied cell in a column and found this (=SUMPRODUCT(MAX(ROW($C$52:$C$190)*($C$52:$C$190<>"")))). It returned the row number and worked for me. I tried to look up the functions and how it works but there was nothing about multiplying rows and "<>" and how "max" would work in this equation. Could someone explain this equation to me in detail? I like to know how things work.

Thanks

What you have written indeed doesn't work: Needs to read:

`{=SUMPRODUCT(MAX(ROW($C$52:$C$190)*($C$52:$C$190<>"")))}`

(curly brackets are indicatingarrayfunctions)The formula works without being array function - at least in 6.3.0.3...

I didn't write all the equation in the cell, it is =INDIRECT("c"&(SUMPRODUCT(MAX(ROW($C$52:$C$190)

($C$52:$C$190<>""))))) but it returned the value in the last occupied cell in column C. The equation in cells c52 to c190 is =IFERROR(IF(B57="","",IF(B57<minimum,c56-(agreedamount-minimum)-(minimum-b57)< em="">Penalty,C56-(AgreedAmount-B57))),"") . I just wanted to know how the sumproduct(max..... part of the equation worked. It is working and gives me the last number I needed. Thanks for the quick reply