Search code examples
google-sheets

How to assign a word a value then find the sum in google sheets?


i have found different formulas online but none have worked i need late = 1 and early = 2

| Column A | Column B | Column C | | -------- | -------- | ________ | | late | early | late |

then in a table like this find the sum of the row

the answers should be 4 but i cant seem to find a formula in google sheets to get me the right answer


Solution

  • You may try:

    =sum(switch(A2:C2,"late",1,"early",2,))
    

    enter image description here