Forum Discussion

Celia9's avatar
Celia9
Brass Contributor
Jul 25, 2022
Solved

Conditional format Header and First column match

Hi all,   I have a table with the name of employees in the header. Dates are in the first column of the table. There could be multiple rows with the same date.   Also, I have a table with the na...
  • Lorenzo's avatar
    Jul 25, 2022

    Hi Celia9 

     

    (You don't use Tables but Ranges)

     

    - Setup TableHolidays as shown in J2:K8
    - Named range J3:J9 EmpNames
    - Named range K3:K9 EmpHolidays
    - Selected C2:H9 > Conditional Formatting > New Rule > Use a formula to determine...:

    =SUM(--ISNUMBER(MATCH(EmpNames,C$1,0) * MATCH(EmpHolidays,$A2,0)))

     

    Notes:
    - Used a https://www.bing.com/ck/a?!&&p=f6aaf34c9625aa63JmltdHM9MTY1ODczNDE2MiZpZ3VpZD1lMzMwMDM1NS03ZGFjLTQwZjktOGNjMS05MzBmMmNkZmM1ZWYmaW5zaWQ9NTE3MQ&ptn=3&hsh=3&fclid=80776687-0beb-11ed-beda-d2daf567e3ca&u=a1aHR0cHM6Ly9zdXBwb3J0Lm1pY3Jvc29mdC5jb20vZW4tdXMvb2ZmaWNlL2Zvcm1hdC1hbi1leGNlbC10YWJsZS02Nzg5NjE5Zi1jODg5LTQ5NWMtOTljMi0yZjk3MWMwZTIzNzA&ntb=1 so new entries will be taken into account automatically (a Table auto-resize when you add a new entry in the 1st row following the bottom of the Table)
    - Named the Table's ranges as we can't MATCH (or similar) in a Table when doing Cond. Formatting

Resources