To display the unique text based on some criteria in other column

Copper Contributor

What should be the excel formula to display the name of cities in a single cell where both age group of people lives.

1st Age group=>30

2nd Age group=<30

Employee NoAgeExperienceLocation 
Employee 12812Mumbai
Employee 24320Sydney
Employee 32817Mumbai
Employee 43410Sydney
Employee 52810Sydney
Employee 63412Bangalore
Employee 73216Bangalore
Employee 84312Mumbai
Employee 94422Mumbai
Employee 104321Kolkata
Employee 112812Mumbai
Employee 123413Singapore, Singapore
Employee 134416Melbourne
Employee 143814Dubai
Employee 154521New Delhi, India
Employee 162916Chennai, India
Employee 173716San Fransico
Employee 182913Jakarta
Employee 194113San Fransico
Employee 203715Jakarta
5 Replies

@deepak1310 

Also included is two sample file with some options.

Sort data in a range or table

Sorting data is an integral part of data analysis. You might want to arrange a list of names in alphabetical order, compile a list of product inventory levels from highest to lowest, or order rows by colors or icons. Sorting data helps you quickly visualize and understand your data better, organize and find the data that you want, and ultimately make more effective decisions.

You can sort data by text (A to Z or Z to A), numbers (smallest to largest or largest to smallest), and dates and times (oldest to newest and newest to oldest) in one or more columns. You can also sort by a custom list you create (such as Large, Medium, and Small) or by format, including cell color, font color, or icon set.

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

I want to display the names of cities in one cell/many cell where both age group people lives(greater than 30 and less than 30).In the table 3 cities fulfill this criteria I.e Jakarta,Mumbai and Sydney.I want to display the names of these cities in one/many cell using excel formula and functions

@deepak1310 

Try this:

 

=TEXTJOIN("; ", TRUE, UNIQUE(FILTER(D2:D21, COUNTIFS(D2:D21, D2:D21, B2:B21, ">=30")*COUNTIFS(D2:D21, D2:D21, B2:B21, "<30"), "")))