I'm looking for a formula to find the most recent nonblank row, to compute some additional statistics on. My spreadsheet is going to look something like this:
A | B | C | D | |
---|---|---|---|---|
1 | 1 | 3 | ||
2 | 2 | 5 | 2 | 5 |
3 | 3 | 7 | ||
4 | 4 | 9 | ||
5 | 5 | 11 | ||
6 | 6 | 13 | 4 | 8 |
7 | 7 | 15 |
For example, for the formula in cell C6, I want it to discover that the most recent row with data in column C was row 2, and make a computation based on that. I will not know, in advance, how many blank rows there are in between.
It looks like the XMATCH
function would do just what I want, but that appears to be Office 365 only. I'm using Excel 2016 for Mac, and I'd like my spreadsheet to be portable to Excel versions of that vintage.
Willing to use VBA if I have to, I guess.