Lookup names that are in another list but have them listed one row after another

AlexK_

New Member
Joined
Feb 21, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello,

Hoping someone can assist me with this excel question.

I would like to create List3 as it looks. If the color in List2 is in List1, then I want it to show up in List3. The part I am stuck on is getting List3 to pull green to the first row,, blue to the second row, and so on.

Appreciate the time you spend assisting me.

Thank you.
Alex

List1List2List3
redbrowngreen
yellowbrownblue
orangebrownblack
bluegreen
greenbrown
purplebrown
blackblue
whiteblack
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
With Power Query aka Get and Transform Data and found on the Data Tab of the Ribbon

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Removed Duplicates" = Table.Distinct(Source),
    Source2 = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    #"Removed Duplicates1" = Table.Distinct(Source2),
    MQ = Table.NestedJoin(#"Removed Duplicates", {"List1"}, #"Removed Duplicates1" , {"List2"},"List3",JoinKind.LeftOuter),
    #"Expanded List3" = Table.ExpandTableColumn(MQ, "List3", {"List2"}, {"List2"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded List3", each ([List2] <> null)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"List1"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"List2", "List3"}})

in
    #"Renamed Columns"

Book3
ABCD
1List1List2List3
2redbrowngreen
3yellowbrownblue
4orangebrownblack
5bluegreen
6greenbrown
7purplebrown
8blackblue
9whiteblack
Sheet1
 
Upvote 0
With 365:
Book1
ABC
1ist1List2List3
2redbrowngreen
3yellowbrownblue
4orangebrownblack
5bluegreen
6greenbrown
7purplebrown
8blackblue
9whiteblack
Sheet3
Cell Formulas
RangeFormula
C2:C4C2=FILTER(B:B,COUNTIF(A:A,B:B)>0,"")
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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