excel searching for key word on multiple lines -


is there way combine following excell formula 1 line , cover lines? example @ a1 , 5?

=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)  

so trying scan of key word of black. if key word black in want go on b , numerical value. after want go on c , search key word of black, if there want go d , numerical value. want b positive values (that represents inventory have received) , wand d represent negative values (that inventory have shipped out).

seems want add values in column b if corresponding row in column a contains keyword black , same thing column e looking keyword in column d.

this can done sumif formula. if want add more criteria, try sumifs. here's formula should like:

=sumif(a:a,"black",b:b)-sumif(d:d,"black",e:e) 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -