Conditional formatting rows or cells if two columns equal in Excel
In this article, I introduce the method on conditional formatting rows or cells if two columns equal in Excel.
Method A Conditional formatting rows or cells if two columns equal
In Excel, you can use the Conditional Formatting function to automatically shade the rows or cells if two columns equal.
1. Select the first list of data you want to compare to the second one, for instance, A2:A7, then click Home > Conditional Formatting > New Rule.
2. In the New Formatting Rule dialog, select Use a formula to determine which cells to format from Select a Rule Type section, then type =$A2=$B2 into the text box under Format values where this formula is true.
Tip: A2 is the first cell in the first list, and B2 is the first cell in the second list you want to compare to.
3. Click Format in the New Formatting Rule dialog, then select a background color under Fill tab in the popping Format Cells dialog.
4. Click OK > OK to close the dialogs. Now the cells have been shaded if two columns equal.
Note: if you want to fill rows when two columns equal, select two lists as range, and then apply the New Formatting Rule dialog.
Method B Highlight and select cells if two columns equal
If you want to highlight the cells if two columns equal, and at the same time, to select the cells, you can use the Compare Cells feature of Kutools for Excel.
After free installing Kutools for Excel, please do as below:
1. Select the first list, then select the second list with holding Ctrl key, then click Kutools > Compare Cells to enable the Compare Cells dialog.
2. In the Compare Cells dialog, check Same cells option, check Fill backcolor or Fill font color check boxes, and select a color as you need.
3. Click Ok, now the cells have been selected and highlighted as well if two columns equal.
Click to download sample file
Other Operations (Articles) Related To Conditioanl Formatting
Apply conditional formatting for each row
Sometimes, you may want to apply the conditional formatting for per row, except repeatedly setting the same rules for per row, there are some tricks on solving this job.
Search and highlight search results in Excel
In Excel, you can use the Find and Replace function to find a specific value, but do you know how to highlight the search results after searching? In this article, I introduce two different ways to help you search and highlight search results at the meanwhile in Excel.
The Best Office Productivity Tools
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Favorite and Quickly Insert Formulas, Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name...
- 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!
Please leave your comments in English