Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel: Find last value in an array

I have a dataset with

> A b c d...AA,BB
>1,2,3,4 
> apple apple apple
> orange pear pear apple pear
> grapefruit,grape, grape,grape

Is there a way to find the final occurence of a particular fruit in the array automatically via formula in Excel?

like image 668
UKDataGeek Avatar asked Apr 06 '26 07:04

UKDataGeek


1 Answers

You need to use counta to tell you how many items are in the array and index to get the value of the last element.

You can try

=INDEX(1:1,0,COUNTA(1:1))

This will find the last value in the 1:1 array.

like image 188
dogbane Avatar answered Apr 09 '26 01:04

dogbane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!