Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Count non-empty cells for last 7 rows (dynamically)

$
0
0

I'll preface to say I've asked AI for a bit of help with this and after reading more into the function, I can't see why it isn't working as expected.

I have a list set of data that will grow every day - new day's data at the bottom of the table

enter image description here

I would like to count the number non-empty cells in column C, and with a bit of AI help I got the formula:

=COUNTA(INDEX(C:C, MAX(2, COUNTA(C:C)-6)):C)

From my understanding, counta will count non-empty cells, and the index part I'm not 100% on, but looks to me that it's taking into account the whole C column, offsetting it so it doesn't account for the header and counts 6 back from the bottom... But that's just a guess.

Ideally, what I'm looking for is to count the number of non-empty cells in C over the last 7 entries within the whole table, where this may include the latest row having an empty C cell as is pictured.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>