I suggested my original approach because it was only two values. With this larger list, you need to put in a "chart" somewhere and just refer to it.
Here I've added the chart to the last page and then changed the formula in D4 to:
=IF(B4="", 0, IF(COUNTA(B4:C4)=2, (C4-B4) * 24 - 0.5, IF(ISNUMBER(MATCH(B4, 'Lists for Stores'!$C:$C,)), INDEX('Lists for Stores'!$D:$D, MATCH(B4,'Lists for Stores'!$C:$C,)), 0)))
NOTE: The reason your nested IF(IF(IF))) wasn't working was you exceeded the nesting limitations. Anytime you find yourself evaluating the SAME cell over and over with multiple IFs, there's usually a better way with a lookup table of some sort.
Bookmarks