The Best Office Productivity Tools Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80% Note: if you want to fill rows when two columns equal, select two lists as range, and then apply the New Formatting Rule dialog. Now the cells have been shaded if two columns equal. Click Format in the New Formatting Rule dialog, then select a background color under Fill tab in the popping Format Cells dialog.Ĥ. 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.ģ.
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. 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.Ģ.
In Excel, you can use the Conditional Formatting function to automatically shade the rows or cells if two columns equal.ġ. Method A Conditional formatting rows or cells if two columns equal