Answer the question
In order to leave comments, you need to log in
How to fill a cell with a value if another cell contains certain text?
In cell A1 the text is "red t-shirts"
In A2 "blue hoodies"
In A3 "red sweatshirts"
You want B1-3 to display the correct value depending on what text is contained in A1-3. If the text contains "t-shirts", then display "T-shirt". If the text contains "hoodie", then output "hoodie", etc.
I tried =IFS(SEARCH("t-shirt", A1); "t-shirt"; SEARCH("hoodie", A1); "hoodie") , but only works for "t-shirt".
Tried =IF(SEARCH("t-shirt", A1), "t-shirt"), but I don't know how to add conditions for hoodies and sweatshirts.
Answer the question
In order to leave comments, you need to log in
So?
=ЕСЛИ(REGEXMATCH(A1;".*футболк.*");"Футболка"
;ЕСЛИ(REGEXMATCH(A1;".*худи.*");"Худи"
;ЕСЛИ(REGEXMATCH(A1;".*свитшот.*");"Свитшот"
;""
)
)
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question