Hi Mike,

This sounds like a perfect case for the IF function. You could use the IF function to always assign your 'special case' to the Labor category and then either use VLOOKUP or additional IF functions for all other cases.

You said you have a good reason not to use VLOOKUP, but it would make for a much more compact and readable formula. With VLOOKUP, your formula would look something like this:

**=IF([First Digit]=2,"Labor",VLOOKUP([Last Digit],Category,2,FALSE))**

This formula models the following logic:

If the first digit is 2, show *Labor*, otherwise use VLOOKUP to find the category based on the last digit.

You can see an in-depth explanation of how the IF function works in the video lesson: Expert Skills Lesson 3-5 Use the IF logic function.

For instructions on how to use the VLOOKUP function, see the video tutorial: Expert Skills Lesson 3-22 Use a VLOOKUP function for an exact lookup.

Without VLOOKUP, you would have to use a series of nested IF functions to check for each category individually. This means it would be a much more complicated formula like this:

**=IF(OR([First Digit]=2,[Last Digit]=1),"Labor",IF([Last Digit]=2,"Misc. Labor","Non-Labor"))**

This models the logic:

If the first digit is 2 OR the last digit is 1, show *Labor*, otherwise if the last digit is 2, show *Misc Labor*, otherwise show *Non-Labor*.

You'll notice that I've used the OR function to reduce the number of IF functions that are needed. You can see more about how the OR function works in the video lesson: Expert Skills Lesson 3-16 Use the AND and OR functions to construct complex Boolean criteria.

I have attached an example workbook showing these formulas in action:

**IF-OR.xlsx** **11.28KB**
46 downloads

I hope this is the solution you were looking for, but please feel free to reply if you need any more help with this.