Forum Discussion

MAVOTRP's avatar
MAVOTRP
Copper Contributor
Feb 27, 2024
Solved

IF AND formula to check name and date then return YES, NO

Hello. I have a formula in Excel that checks if the name in cell A109 matches any of the names in the Name adjusted column of Table1. It also checks if the date in cell D105 matches the Leave Date co...
  • djclements's avatar
    Feb 27, 2024

    MAVOTRP To use the MATCH function with multiple criteria, try the following:

     

    =IF(ISNUMBER(MATCH(1, (Table1[Name adjusted]=A109)*(Table1[Leave Date]=$D$105), 0)), "YES", "NO")

     

    Note: with older versions of Excel, you may need to press Ctrl+Shift+Enter when entering this formula.

     

    For more information on how this works, please see: https://exceljet.net/formulas/index-and-match-with-multiple-criteria 

     

    Alternatively, you could also use the COUNTIFS function as follows:

     

    =IF(COUNTIFS(Table1[Name adjusted], A109, Table1[Leave Date], $D$105), "YES", "NO")

     

    I hope that helps. Cheers!

Resources