Hello Pros,
I have over the years I've learned much from this site, only this time I think I actually have to post a question as I am in need for a specific answer.
I have made an employee schedule, I have all the coding down to do exactly what I need it for. Upon its implementation my team did not like that I got rid of the color fills for each cell that were associated with their shifts. I didn't want to make a separate sheet and list all the possible combinations of shifts to determine which color to code the cell then refer back to that sheet as I had done in the past. That process was searching for a specific shift and would color it. But if i made an odd shift such as 8a -9a it would not know what to do as it was not a defined shift.
On my new schedule I wanted to use conditional Formatting to search the cell for the first 3 characters/number and determine it as a start time for a shift. Using an defined table that I called "ShiftData" the formula was to search the cell and find the start time and search the table "ShiftData" for a shift code. From that shift code it would know to color all cells that color. I don't know if this is the easiest way or not, I was recycling code i used on my old schedule to make it work, only conditional formatting will not do what i want no matter how i code it. This is where i need help.
This is the code that has been giving me the best results only its coloring everything else but what should be that color:
=IF(B14="OFF","0",IF(B14="R/OFF","0",IFERROR(VLOOKUP(SUBSTITUTE(SUBSTITUTE(LEFT(B14,3)," ","",1),"-",""),ShiftData,2,FALSE),0)))
If I had this in a cell it would work and give me the 1A result, so i know the formula works, i just don't know how to get it to apply to conditional formatting so that all 1A shifts are colored yellow.
Any assistance would be greatly appreciated.
Bookmarks