Hi rasika_99,
This will do what you need, just add this formula in to cell D6 only. Formula will list all the matches from cell D5 downwards.
Also the formula will remove any duplicates.
PS change the 'Sheet5' to the name of your sheet and the refereces accordingly.
Excel Formula:
=UNIQUE(FILTER(Sheet5!$B:$B,Sheet5!$A:$A=$D$3))
My examples...
View attachment 116343View attachment 116345View attachment 116346
Also if you conditional formatting to column D, to add border if cell is not empty ( <>"" ) to keep the cell borders based on the selection.