title: How to apply if condition on multiple cells in Excel
body: <p>I am trying to sum cells that meet certain criteria in another cells. The image below shows an illustration of what I am trying to achieve: </p>
  
  <p><a href="https://i.stack.imgur.com/bysbk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bysbk.jpg" alt="enter image description here"></a></p>
  
  <p>If I follow the approach shown in the image above to sum all the W's, this requires an IF statement for each W which is inconvenient because I have a dataset that goes from W1 to W100. Is there an efficient way to get the conditional sum when in case I have multiple W's without writing IF statement for all cells? Thanks for your help in advance.</p>