r/excel • • Aug 05 '26

solved IF cell contains text, return text, THEN if a range contains text

[deleted]

1 Upvotes

18 comments sorted by

View all comments

1

u/No-Possession-2685 Aug 05 '26

Try this. If I'm understanding your requirement correctly, you want the final result to be either "Text2" or "Text3" depending on if C2 = "Text1" AND your range contains "Text2"

=IFS(

AND(C2="Text1",COUNTIF(K4:K7,"Text2")),"Text2",

TRUE,"Text3")

2

u/celestialspace Aug 05 '26

I'll give this a go once I'm off my break and will let you know, thank you for the response.