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.

Method: Apply Conditional Formatting across Workbook


Step 1: 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.

Step 2: 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

Step 3: 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

Step 4: 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

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

How to Apply Conditional Formatting across Workbook 7

Step 6: 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

Step 7: 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

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

How to Apply Conditional Formatting across Workbook 10

 

 

Related Posts

Excel Structure Reference

This tutorial introduces the basics of structured referencing in Excel and shows you how to use structured referencing in a table with examples. When you use formulas that reference tables, whether the formula references a part of the table or ...

Excel/Google Sheets: Full Row Reference

Excel or Google sheets supports both full row references and full column references. This article will talk about the usage of full row references. Full Row reference is another cell reference in Excel or Google Sheets, which is used to ...

Excel/Google Sheets: Full Column Reference

Full column reference is another cell reference in Excel or Google Sheets, which is used to reference the entire column, for example, if you want to reference the entire column A, you can use the following reference format A: A. ...

Excel/Google Sheets: Expanding Reference

An expanding reference is a reference type in Excel and Google worksheets that extends the range of a cell when a formula is copied to the cell below or to the right. In this article, we will explain how to ...

Excel/Google Sheets: Mixed Reference

In Microsoft Excel Spreadsheet or Google sheets, there is another cell reference, mixed references, where part of the reference is absolute, part of the relative. This article will describe how to use mixed references through specific examples. Mixed Reference When ...

Sidebar