I have an excel table as shown below:
There are two inputs, Location Code and Job Code.
Based on the Location Code, I have to first validate whether the Job Code exists in either of the rows with the same Location Code.
If the Job Code is present, then the Admin Sal Plan code from that particular row has to be retrieved, and if not, then the Admin Sal Plan code from the previous row(one where the job code is empty) has to be retrieved.
Location Code: 102, Job Code: 1123
This should retrieve Admin Sal Plan: SEQA
Location Code: 102, Job Code: 112342
This should retrieve Admin Sal Plan: SEQ
This is a little tricky, so I was hoping of anyone could help me out here, preferably with LINQ since the dataset is actually quite large(dealing with employee details here)
Thanks in advance!