Forum Discussion

Ktgcampbell's avatar
Ktgcampbell
Copper Contributor
May 19, 2022

Will a formula work in Conditional Formatting?

I have a spreadsheet with 2 pages. 

The first tab (master list) lists a person's username and the classes they have to complete. 

The second tab (completion report) lists usernames, the class ID and the person's completion status.

What I would like is, on the first spreadsheet (master list), for the class number to turn green if the person successfully completed it, red if they were unsuccessful and orange if they show not evaluated. 
I just can't seem to be able to figure out a formula that would work. 

First Tab looks like this

 ABDE
1Employee UsernameCourse ALEXRCT1128Course ALEXRCT1115Course ALEXRCT1234
2A1234005351610049161500496013
3A1235005351610049161500496013
4A1236005351610049161500496013

 

Second tab looks like this

 ABC
1UsernameClass NumberCompletion Status
2A123400535161Not Evaluated
3A123400491615Successful
4A123400496013Successful
5A123500535161Not Evaluated
6A123500491615Not Evaluated
  • flexyourdata's avatar
    flexyourdata
    Iron Contributor

    Ktgcampbell 

     

    You can use XLOOKUP to find the row in the completion report that matches the combination of employee username and course ID in the master list, then return the completion status of that row in the completion report (or "No data" if it's not found).

    Then test if the returned value is "Successful".

     

    The important thing here is that the lookup_value has a fixed column for column A and a fully relative reference in column B. The lookup_array is the concatenated values for columns A and B of the completion report.

     

    =XLOOKUP(
    $A2&B2,
    'COMPLETION REPORT'!$A$2:$A$6&'COMPLETION REPORT'!$B$2:$B$6,'COMPLETION REPORT'!$C$2:$C$6,
    "No data"
    )="Successful"

     

     

Resources