As I wrote in post #15 'useless' so between quotes …
As I wrote in post #18, in particular for beginners, it can make a code easier just thinking first about what Excel offers
rather than following a classic algorithm path …
Obviously for big data playing with arrays and loops is often the way to go.
But for few data, what is the best code, the faster, the shorter, the smarter, the … ?
In fact none and all ! As it just depends on the original poster : the best code is the one he can understand and maintain himself !
And as Excel features can be easily operated so with the help of the Macro Recorder it's easier for some beginners to start to learn VBA …
And like VBA usual coders, I prefer to avoid sometimes a 'lot' of codelines by using just an Excel feature which already does well the job
like for example the post #18 thread in link just needing two codelines :
the first codeline must be an Excel formula allocated to a worksheet cell using COUNTIF or MATCH whatever and
the second - last - codeline is just an advanced filter using this cell in the criteria, that's all folks !
My post in this thread was to make the original poster think how can it be possible to do it manually and to code it just with 2 codelines
but he did not ask for and as the 'MrExcel MVP' must know this classic Excel way but continue on his own
so I won't waste any time following « Solution belongs to well readers … »
Of course if I had been the first to reply I would have posted my bunch of two codelines !
I sent it to a VBA beginner kid as a 'lockdown exercice' (no school during 3 weeks) and he well found this Excel solution
operating manually - the 'difficult' part for him was the formula - and just using the Macro Recorder
but he asked me : « Too easy, how can it be possible to ask for that in a forum, are you kidding me ?‼ »
Forgive him, he's so young.