How to Apply Conditional Formatting across Workbook in Excel

Sometimes we list all products/students or other objects information in one workbook, but list part of them into another workbook based on some criteria. For example, we list all student’s information into workbook Book1 Sheet-All, and list the students who pass the exam in Book2 Sheet-Pass. If we want to lookup students in Book1 refer to the list in Book2, we can apply conditional formatting function to mark these students with proper format.

Precondition:

Table1 in Book1 Sheet-All.

How to Apply Conditional Formatting across Workbook 1

Table2 in Book2 Sheet-Pass.

How to Apply Conditional Formatting across Workbook 2

Now, we want to find out matched values in table1 based on values in table2.

1. Apply Conditional Formatting across Workbook

Step1: In this step, you can copy table2 from Book2 to Book1 Sheet-All just next to table1. Or you can type the formula ='[Book2.xlsx]Sheet-Pass’!A2 into any cell next to table1 to get values from Book2 table2. Drag fill handle down till 0 displays.

How to Apply Conditional Formatting across Workbook 3

Now all names exist in table2 from another workbook/worksheet are copied into current workbook/worksheet.

Step2: Select table1, this table is the range we want to apply conditional formatting function. Click Home in ribbon, then click Conditional Formatting in Styles group, select New Rule in menu.

How to Apply Conditional Formatting across Workbook 4

Step3: On New Formatting Rule dialog, select the last rule type: Use a formula to determine which cells to format.

How to Apply Conditional Formatting across Workbook 5

Step4: In Edit the Rule Description section, in Format values where this formula is true textbox, enter this formula =COUNTIF($E$2:$E$4,$B2)>0. In this formula, $E$2:$E$4 is the range you refer to from table2 (just copied to current worksheet), $B2 is the first name you want to look up from another workbook.

How to Apply Conditional Formatting across Workbook 6

Step5: Click Format button in Preview section. Verify that Format Cells window is displayed.

How to Apply Conditional Formatting across Workbook 7

Step6: Click Fill tab, then select a color as background color. For example, select yellow, then click OK.

How to Apply Conditional Formatting across Workbook 8

Step7: After above step, we go back to New Formatting Rule window. You can see that in Preview section, cell is filled with yellow. Click OK.

How to Apply Conditional Formatting across Workbook 9

Step8: After above all steps, check table1. Verify that matched values are marked with yellow properly.

How to Apply Conditional Formatting across Workbook 10

2. Video: Apply Conditional Formatting across Workbook in Excel

This video will show you how to apply conditional formatting across workbook in Excel using rules that determine the format of cells based on their values.