How to compare (match) two lists (columns) and when a match is found copy a number of adjecent cells to another location?

SherlockHomeless

New Member
Joined
Nov 3, 2016
Messages
2
I need to reorder some data I have.

I have about a thousand cells with data in a column (say column A) and around 800 cells with data in another (say in column B). All the data are strings. So I need to check for every value of every cell in column A if there's a match in column B. If a match is found, 8 columns adjacent to the column B (like for example B1, B2... B[N]) should be copied and 'pasted' somewhere else (for example a few columns to the right of the B column - like in the cells from column K - S or something) BUT not in the same row (just shifted to the right). They should be pasted in a row that matches the cell from column A for which the match was searched in column B.

I made a picture to visualize what I actually need. Maybe it will help.

aaaa.png



So far, I tried to use a combination of the INDEX and MATCH functions but I didn't have any luck because all I could achieve was to shift the cells a couple of columns to the right but I couldn't put them in the right row.

Note that I only have basic excel skill and, besides not having enough time, I don't think learning more advanced stuff for the couple of times a year that I may need it would be worth the time required to master it.

Thanks for reading and/or any replies.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Based on the data in your image, try something like this in I11 and drag across and down to cover your range...

=INDEX(C$11:C$16,MATCH($A11,$B$11:$B$16,0))

HTH,
~ Jim
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,673
Members
449,178
Latest member
Emilou

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