Quote Originally Posted by hemesh View Post
then try below
=MAX((D2:D1000<>"")*(ROW(A2:A1000)))-MAX((D2:D1000=E2:E1000)*ROW(E2:E1000)*(E2:E1000<>""))

copy paste above then hold control and shift together and then hit enter to make it array formula
This one works perfect too, thanks hemesh, all of you are great experts.
Hope one day I could have the 1% of your excel knowledge