Search code examples
google-sheetsgoogle-sheets-formulamatchvlookup

Compare 2 column A's in 2 different sheets and if they match, check Column B in the second sheet and return "FALSE" in the first sheet if it's blank


I'm trying to have my 'Checkbox' column (Column B in Sheet1) to get filled in with either a TRUE or FALSE value based on two conditions

  1. A match between column A's of both sheets
  2. If the 'By' column (Column B in Sheet2) is blank -> to return False

https://docs.google.com/spreadsheets/d/1CwS87yOdhZ7LaSUcGEb2vYSdQoSLxDey7PwLBq3qgW8/edit#gid=1855694027

I've been trying to use vlookup but don't know how to introduce the second part of my condition to the formula :')


Solution

  • You can use the VLOOKUP function and check whether the returned value is blank or not.

    =ARRAYFORMULA(""<>VLOOKUP(A2:A6,Sheet2!A:B,2,0))
    

    This formula is entered in the first row containing the checkbox; you have to remove the checkboxes below to give room to the formula to expand then you can reinsert them.