Quote:
	
	
		| 
					Originally Posted by Alex  Oh there were two pictures. 
 Ok, in cell G5 the problem is that you have the SUM going C4:F4 instead of B4:F4. With what you have you end up asking "what is the minimum of 8, 8, and 8).
 
 Once you fix that sum you're going to get 0 in G5.
 | 
	
 Cell G5 is =IF(SUM(C5:F5)<40,MIN(MIN(8,40-SUM(C5:F5)),G4),0)
I'm not seeing C4:F4 - or am I missing something.