compare col A to col Z, sort col A based on matches with col Z. Matched terms place at top, non-matched terms below

Davefromlondon

New Member
Joined
Feb 25, 2021
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
HI, I have between 1 and 50 columns in a sheet1
I have another column in another sheet2 - call this COL Z.
COL Z has a list of "terms" , each term in a row, maybe 30 terms in the list, maybe less, it can grow as I add terms manually in the future
COL 1 has a variable number of "names" on each row. Might be 1,2 or 20 or more names
I seek to compare COl 1 Names with COL z terms then sort Col 1 with name/term matches at the top of the column, then a space row, then list below those where there is no match
always 1 term or name per row but a name or term could be more than 1 word, maybe 2 or 3 words
Repeat for Col 2
Repeat till last column (less than col 50)

in other words.... compare a column 1 with a fixed column Z, sort Col1 with "matches with Z" at the upper end of the column, a blank row, then the non-matches
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Watch MrExcel Video

Forum statistics

Threads
1,129,272
Messages
5,635,217
Members
416,847
Latest member
inaramos

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
Top