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?


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

enter image description here

  • imgur.com/a/GkDmmyC imgur.com/cxRH6xy This is the graph im currently working with. Its a little game iv been working on with some friends for a while and were moving out of play testing and game design and into trying to automate some of the systems. I'm trying to automatically calculate resource counts on the map (YWC meaning Yellow Wood Camp Thats why it adds one wood, and YF meaning Yellow Farm, that's why it "Costs" one wood) We thought it'd be fun to make the game in google sheets so wed have a game we could play that our school couldn't block haha. Jan 12 '20 at 0:34
  • Looks awesome. :D Jan 12 '20 at 4:41

You can apply a multiply factor to any of your terms:

=countif(B8:BJ65, "RWC")-COUNTIF(B8:BJ65, "RF")-3*COUNTIF(B8:BJ65, "YDO")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.