Bingo, this is what I was looking for. Thanks, it solved my query.
It would be really great and helpful of u if you could explain how you did it i.e. how the formula works.
Formula:
=COUNTIF(INDEX($A$2:$G$4,MATCH($J$2,$A$2:$A$4,0),2):INDEX($A$2:$G$4,MATCH($J$2,$A$2:$A$4,0),7),I3)
Apart from that I was not getting correct result if I append more columns, but anyhow I understood the formula(for column append part only) and replaced the number of columns from 7 to number of columns I added and it worked.
Thnks, you made my day.!!!
Bookmarks