In Column A from A2 to A20, I have names.
In B1, I type "John".
In B2, I have an array formula entered using Ctrl+Shift+Enter.
I have copied it down from B3 to B20.
It filters names having the word "John".
But, there are duplicates in the displayed List.
I would like to suppress the duplicates.
I can do it in VBA.
But I will appreciate suggestions from any expert to do it without using VBA, as I need to use it directly in an Excel Sheet and not through a programme.
So, kindly suggest me to edit this formula so that it filters the search text and also displays only unique values.
(If there is way to display it in alphabetical order, that will be good. But it is not a must.)
Thanks in advance.
This is the formula in B2:
=IF($B$1="","",IFERROR(INDEX($A$2:$A$20,SMALL(IF(ISNUMBER(SEARCH($B$1,$A$2:$A$20)),ROW($A$2:$A$20)-ROW($A$2)+1),ROWS($A$2:$A2))),""))
This is the source data :
Name
David John
Jonah
Robert
Samuel Johnson
David John
Kingsley
Williams
James Williams
Nelson
John Bright
Anderson
Joseph
Moses
Samson
John
David John
Christopher
John Bright
Paul
This is the search Text : "John"
The displayed result:
David John
Samuel Johnson
David John
John Bright
John
David John
John Bright
This is the expected result:
David John
Samuel Johnson
John Bright
John
In B1, I type "John".
In B2, I have an array formula entered using Ctrl+Shift+Enter.
I have copied it down from B3 to B20.
It filters names having the word "John".
But, there are duplicates in the displayed List.
I would like to suppress the duplicates.
I can do it in VBA.
But I will appreciate suggestions from any expert to do it without using VBA, as I need to use it directly in an Excel Sheet and not through a programme.
So, kindly suggest me to edit this formula so that it filters the search text and also displays only unique values.
(If there is way to display it in alphabetical order, that will be good. But it is not a must.)
Thanks in advance.
This is the formula in B2:
=IF($B$1="","",IFERROR(INDEX($A$2:$A$20,SMALL(IF(ISNUMBER(SEARCH($B$1,$A$2:$A$20)),ROW($A$2:$A$20)-ROW($A$2)+1),ROWS($A$2:$A2))),""))
This is the source data :
Name
David John
Jonah
Robert
Samuel Johnson
David John
Kingsley
Williams
James Williams
Nelson
John Bright
Anderson
Joseph
Moses
Samson
John
David John
Christopher
John Bright
Paul
This is the search Text : "John"
The displayed result:
David John
Samuel Johnson
David John
John Bright
John
David John
John Bright
This is the expected result:
David John
Samuel Johnson
John Bright
John