Google Sheets - Cell contains text

Multi tool use
Google Sheets - Cell contains text
I have a google sheet with cells that contain different words. I want the words to equal numbers if present in a different cell. Normally I can just use =if when there is just one word but can't for this. I've tried using =regexactmatch and =search but can't get it to work.
For example the cell might contain the following text:
"Uruguay, France, Brazil, Belgium"
I want Uruguay, France, Brazil to each = 3 in another cell but Belgium to = 0 in that same cell.
1 Answer
1
I think does what you ask:
=substitute(substitute(substitute(substitute(A1,"Uruguay",3),"France",3),"Brazil",3),"Belgium",0)
but, possibly like user who VTC'd as Unclear, I doubt it is what you want.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.