Reputation: 1648
In a column, there are multiple cells with duplicate values. How can I get cell address with duplicate values?
For example in the sample below Apple is repeated in B2, B5, B7
Upvotes: 1
Views: 1415
Reputation: 152585
If one has the dynamic array formula TEXTJOIN and FILTER:
=TEXTJOIN(", ",TRUE,"B" & FILTER(ROW($B$2:$B$8),$B$2:$B$8=B2))
Since there is a version that has TEXTJOIN and not FILTER:
=TEXTJOIN(", ",TRUE,"B" & IF($B$2:$B$8=B2,ROW($B$2:$B$8),""))
This would only work in Excel 2019 and will require the use of Ctrl-Shift-Enter to force an array formula.
If one does not have TEXTJOIN look HERE for a UDF that mimics TEXTJOIN and use the second formula with Ctrl-Shift-Enter.
Upvotes: 2