title: Count categories changes in Excel
body: <p>I have specific problem which is best described by a picture.</p>
  
  <p><img src="https://i.stack.imgur.com/UTkMG.png" alt="image of the excel sheet"></p>
  
  <p><em>E1:G10 are rules for categories e.g. change from cat C to C will cause 1 hr delay.</em></p>
  
  <p>There are products which fall into category of a products <strong>A</strong>, <strong>B</strong> and <strong>C</strong>. Next to it you can find quantities of which they are produced. 
  f you want to rebuild machine from cat. A to B etc. it will cost you time (ruling is described next to it).</p>
  
  <p>I need to find a way how to determine time of rebuild. I did it manually and you can see it column <strong>C</strong>. However, I wish Excel would do it automatically. Later I am using data in solver.</p>
  
  <p>Does anyone know solution to my problem? 
  Thanks in advance.</p>