How to get the total number of counts for last not null date in google sheets?

Viewed 103

I am very new to google sheet and I am trying to find the number of counts for last non-empty date.

For example:
In the example below, we have the last date "March-4" and there are 5 rows corresponding to that date. So the answer should be 5.

PUBLIC SHEET
I have shared the public google sheet here: https://docs.google.com/spreadsheets/d/10NzbtJhQj4hQBnZXcmwise3bLBIAWrE0qwSus_bz7a0/edit#gid=517697699

Example sheet

enter image description here

Required Answer

  • Here, the last date is March 4 and it has 5 rows so the answer is 5.
2 Answers

Find the maximum value in the column by using MAX(). After finding this value, use COUNTIF() to count those values.

=countif(C:C,MAX(C:C))

  1. Find the value in the last non empty cell in Column C by using this formula anywhere in the sheet =INDEX(FILTER(C:C, NOT(ISBLANK(C:C))), ROWS( FILTER(C:C, NOT(ISBLANK(C:C)))))

  2. Use COUNTIF to find the number of occurrences of the date found in step 1 above.

So the final formula is =COUNTIF(C:C, INDEX(FILTER(C:C, NOT(ISBLANK(A:A))), ROWS(FILTER(C:C, NOT(ISBLANK(C:C))))))

Related