Creating a Unique New List Based on a 1st List

DaveE

New Member
Joined
Mar 24, 2007
Messages
2
Here is what I would like to do. In the example I have created a table titled "Cities in USA by State". Using the "Data/Validation/Allow:List/Data:=States" drop down option I choose PA in cell G1. Then just below this I want to create a list that gives just those cities located in PA (by referencing cell G1) based on the master list to the left. The attached example shows what I want in the end, but in this example I just typed it in.

Make sense? Can anyone help?

Thanks,
Dave
Book3
ABCDEFGH
1CitiesinUSA,byStateListStateNY
2
3CitiesNYPAUSACitiesNY
4NewYorkXXPittsburghX
5PittsburghXXPhiladelphiaX
6RochesterXXScrantonX
7SyracuseXX
8PhiladelphiaXX
9ScrantonXX
10
Sheet1
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try the following...

H1:

=COUNTIF(INDEX(B4:D9,0,MATCH(G1,B3:D3,0)),"x")

F4, copied down:

=IF(ROWS(F$4:F4)<=$H$1,INDEX(A$4:A$9,SMALL(IF(INDEX($B$4:$D$9,0,MATCH($G$1,$B$3:$D$3,0))="x",ROW($A$4:$A$9)-ROW($A$4)+1),ROWS(F$4:F4))),"")

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top