Check out example codes for "google sheets find last cell with value in range". It will help you in understanding the concepts better.

Code Example 1

=INDEX( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ; ROWS( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ) )

Learn ReactJs, React Native from akashmittal.com