evaluates to 2 because column 2 is the last column that is greater than 0. I presume you want it to include column 5, as that's the first last non-negative number.
Trouble is, if you change that second bit to read Excel interprets all the blank cells as zeros, so this evaluates to 20.
In order to get round that, we'll look for the last non-blank column using the formula and replace the reference to AA11 where it needs to be ">=0" in your original formula with an offset from H11. Then we can change the criteria to ">=0" without it taking the blanks into account.
If this doesn't give you the right results, please can you give a verbal description of what you're trying to achieve. It's done my head in!
Tim
Bookmarks