How to sort a column to match the value in another column in Excel?
As below screenshot shown, you need to compare column 1 and 2, and sort column 2 to match the value in column 1 in Excel. This article will show you method to deal with it.
Sort a column to match the value in another column with formula
Sort a column to match the value in another column with formula
You can compare two columns and sort a column to match the value in another column with formula in Excel.
1. Select a blank cell to output the result, enter the below formula into it and press the Enter key.
=IF(COUNTIF(B:B,A2)=0,"Missing",A2)
Notes:
2. Select the first result cell, then drag the Fill Handle down to list all matched values in the help column.
Related articles:
- How to count cells match to either X or Y in Excel?
- How to find matched value by searching upwards in Excel?
- How to match dates by month and year only in Excel?
- How to check if a cell value match to a list in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!