Forum Discussion

Ajinkya123's avatar
Ajinkya123
Copper Contributor
Jul 20, 2022

Function for adding values to a cell if text is a certain word

I have two columns which have either a "Yes" or "No" in them. If either of these columns have "Yes" written in them, I want a value of 10 in a separate cell(for example C2). If both of these are "Yes" then I want a value of 20 in C2 cell.

2 Replies

    • mtarler's avatar
      mtarler
      Silver Contributor

      alternatively:
      =10*((A2="yes")+(B2="yes"))
      or using dynamic arrays:
      =10*((A2:A10="yes")+(B2:B10="yes"))

Resources