Actually formula provided by Grah in same conversation was for like if the records are in continuation...which I have same applied in uploaded workbook, but that is not working because records are not in continuation.
So actually need to change/correct that formula or If any CODE can sort it out.