I have an excel file where I wish to make comparisons to two columns. I am trying to create a third column that is based off a conditional lookup.
Column1 has input data, Column2 has output data, and Column3 is where I wish to store results from a lookup table. Both have times in them as well. The four conditions I have are the following:
- No input, No Output, Result is "Result One"
- No Input, Output is less than 5 days and 20 hours, Result is "Result Two"
- Input is less than 24 weeks, Output is less than 24 weeks, (But both are greater than one week) Result is "Result Three"
- Input is less than one week, Output is less than one week, Result is "Result Four"
Thus this is how it would be:
Column1 | Column2 | Column3 |
---|---|---|
No Input | No Output | Result One |
No Input | Output 4d02h | Result Two |
Input 23w4d | Output 22w3d | Result Three |
Input 3d01h | Input 2d22h | Result Four |
I have tried creating a lookup table and using the concat feature on Column1 and Column2. This works for "Result One" but for the others they are inequalities and thus I'm not entirely sure on how to do them.