a/1 | b | c | d | e | f | g | h | i | j | |
2 | Location | Rule | Location | Residence state | Work State | Compliance State | ||||
3 | 123 | Use residence state | 123 | NY | CT | |||||
4 | 234 | Use Work State | 234 | NY | NY | |||||
5 | 121 | Use Residence State | 121 | OH | FL | |||||
6 | 1212 | Use Work State | 1212 | OH | TN | |||||
7 | 33 | Use Work State | 33 | FL | AK | |||||
8 | 45 | Use Residence State | 45 | MO | SD | |||||
123 | ND | ND | ||||||||
Desired outcome: Column J is populated by either residence state or work state, depending on the rule in columns b and c for the specific location. For example, J3 should populate with NY, J6 should populate with OH, and J11 should populate with OK | 234 | FL | PA | |||||||
121 | OK | IL | ||||||||