title: excel searching for key word on multiple lines
body: <p>Is there a way to combine the following Excell formula into one line and to cover all lines? for example look at a1 and a 5? </p>
  
  <pre><code>=IF(A1="black",B1,0)-IF(D1="black",E1,0)+
   IF(A2="black",B2,0)-IF(D2="black",E2,0)+
   IF(A3="black",B3,0)-IF(D3="black",E3,0)+
   IF(A4="black",B4,0)-IF(D4="black",E4,0)+
   IF(A5="black",B5,0)-IF(D5="black",E5,0)+
   IF(A6="black",B6,0)-IF(D6="black",E6,0)+
   IF(A7="black",B7,0)-IF(D7="black",E7,0)+
   IF(A8="black",B8,0)-IF(D8="black",E8,0)+
   IF(A9="black",B9,0)-IF(D9="black",E9,0)+
   IF(A10="black",B10,0)-IF(D10="black",E10,0)+
   IF(A11="black",B11,0)-IF(D11="black",E11,0)+
   IF(A12="black",B12,0)-IF(D12="black",E12,0)+
   IF(A13="black",B13,0)-IF(D13="black",E13,0)+
   IF(A14="black",B14,0)-IF(D14="black",E14,0) 
  </code></pre>
  
  <p>So basically  i am trying to scan all of A for the key word of black. If the key word black is in A I want to go over to B and get the numerical value. After that I want to go over the C and search for the key word of black, if that is there i want to go to D and get that numerical value. i want B to be positive values (that represents inventory i have received) and i wand D to represent negative values (that is inventory i have shipped out).</p>