Forum Discussion
balaram51
Aug 03, 2019Copper Contributor
extract unique values matching a text string
I have two columns (A and B). Column A contains the dates and Column B contains the names of people who are required to attend the duty. Now based on this can i have names of people and just below th...
nabilmourad
Aug 06, 2019MVP
SergeiBaklan
Aug 06, 2019Diamond Contributor
Hi Nabil - didn't think in this direction, will check some later
- nabilmouradAug 06, 2019MVP
Eagerly waiting for it
- SergeiBaklanAug 06, 2019Diamond Contributor
Okay, next iteration is with Dynamic Arrays and TEXTJOIN to select and sort names
In N3 for that
=SORT( UNIQUE( TRIM( MID( SUBSTITUTE( TEXTJOIN(",",TRUE,Table1[[Persons required]:[Persons required]]), ",", REPT(" ",LEN( TEXTJOIN(",",TRUE,Table1[[Persons required]:[Persons required]]) )) ), (COLUMN(N1:Z1)-COLUMN($N$1))* LEN(TEXTJOIN(",",TRUE,Table1[[Persons required]:[Persons required]]))+1, LEN(TEXTJOIN(",",TRUE,Table1[[Persons required]:[Persons required]])) ) ),TRUE),,1,TRUE)
and pull dates in more traditional way
=IFERROR( INDEX(Table1[Date], AGGREGATE(15,6, 1/ISNUMBER(SEARCH(N$3,Table1[Persons required]))*(ROW(Table1[Persons required])-ROW(Table1[[#Headers], [Persons required]])),ROW()-ROW(N$3)) ), "")
Without dynamic arrays that's most probably with helper column/row to extract all names and after that select unique from them. Or VBA.
- PeterBartholomew1Aug 09, 2019Silver Contributor
Out of curiosity, why
= (COLUMN(N1:Z1)-COLUMN($N$1))
rather than
= SEQUENCE( 1, 13, 0 )
Do these columns have any particular significance or is it a case of old habits dying hard?
p.s. You seem to be able to work magic with this user interface where I struggle to produce anything but basic text!