Forum Discussion

Jon_Slay's avatar
Jon_Slay
Copper Contributor
May 20, 2024
Solved

linking 2 work books

I am trying to link 2 different workbooks. I am trying to link one work book with my equipment labels to my check list of equipment labels. so when I put in a number in my check list it will turn the...
  • NikolinoDE's avatar
    May 20, 2024

    Jon_Slay 

    Linking two different workbooks in Excel and applying conditional formatting based on whether values match can be achieved with a combination of functions and conditional formatting rules. Here's a step-by-step guide to achieve this:

    Step 1: Link the Workbooks

    1. Open Both Workbooks: Open both the workbook containing your equipment labels (let's call it Labels.xlsx) and the workbook with your checklist (let's call it Checklist.xlsx).
    2. Create the Link: In the Checklist.xlsx workbook, link the cells to Labels.xlsx. Suppose your equipment labels are in column A of Labels.xlsx, and you want to check the values in column B of Checklist.xlsx.

    Step 2: Set Up Conditional Formatting

    1. Select the Range: In Checklist.xlsx, select the range where you want to apply the conditional formatting (e.g., B2:B100).
    2. Open Conditional Formatting: Go to the Home tab, click on Conditional Formatting, and choose New Rule.
    3. Use a Formula to Determine Which Cells to Format:
      • Green for Matching:
        1. Select Use a formula to determine which cells to format.
        2. Enter the following formula:

    =ISNUMBER(MATCH(B2, '[Labels.xlsx]Sheet1'!$A$2:$A$100, 0))

    This formula checks if the value in cell B2 of Checklist.xlsx exists in the range $A$2:$A$100 of Labels.xlsx.

        1. Click on Format, choose the Fill tab, and select green. Click OK.
      • Red for Non-Matching:
        1. Select Use a formula to determine which cells to format.
        2. Enter the following formula:

    =ISERROR(MATCH(B2, '[Labels.xlsx]Sheet1'!$A$2:$A$100, 0))

    This formula checks if the value in cell B2 of Checklist.xlsx does not exist in the range $A$2:$A$100 of Labels.xlsx.

        1. Click on Format, choose the Fill tab, and select red. Click OK.
    1. Apply the Rule: Click OK again to apply the conditional formatting rule.

    Notes:

    • Make sure both workbooks (Labels.xlsx and Checklist.xlsx) are open while setting up the links and applying conditional formatting.
    • If your ranges are different or if your data starts in different rows or columns, adjust the cell references in the formulas accordingly.
    • After setting up the conditional formatting, the colors will automatically update when you enter a number in your checklist, depending on whether it matches an equipment label.

    This approach ensures that your checklist dynamically checks and highlights whether each entry exists in your list of equipment labels, making it easy to visualize matches and mismatches.

    For the conditional formatting and linking to work correctly as described, both workbooks need to be open when you set up the links and apply the conditional formatting. The text was created with the help of AI.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.