Google-sheets – Google sheets – tying a numerical value to different texts

google sheets

I am incredibly new to google sheets and have a basic question, that I can't seem to find an answer for on the internet. Is it possible to count up multiple different texts into one cell, with different values?

What I am trying to do is to get one cell to display information about how many times the instance of "YWC" "YDO" and "YF" appear in a range. I want the cell to add 1 for every "YWC", to take subtract 1 for every "YF" and subtract 3 for every "YDO".

I tried using =countif(B8:BJ65, "YWC") to count YWC, and it added 1 every time it found a YWC.

I then tried =countif(B8:BJ65, "RWC")-COUNTIF(B8:BJ65, "RF") which accurately calculated YWC to add one and YF to subtract one.

However, I am now at an impasse when I try and subtract 3 for every YDO.

Question: is there a way to get a text to read as a number higher than 1?

Best Answer

How about something like this? If you need more help, please share a spreadsheet with your input and desired output.

enter image description here