Return non related value based on one, two or three cells

New Contributor

Cells A2:C2: are populated with text. How can I return a value to D2, that is determined by different combinations of A2:C2? Based only on whether or not A2:C2 values contain text or are empty. D2 would be a different value than any of the A2:E2 values.



A2= Cell Number

B2= Direct Number

C2= email

All formatted as text.


If A,B, and C all contain text, return a value of x.

If only A and C contain text return a value of y.

If only C is populated with text return a value of z.


4 Replies




You can try a nested IF formula.

return value based on one two or three cells.JPG

Thank you! I will give it a go. Take care.


As variant

=SWITCH(SUM(ISTEXT(A2:C2)*{1,10,20}), 31, "x", 21, "y", 20, "z", "not defined")




Maybe you can apply this formula with Office 365 or Excel for the web alternatively.

three columns.JPG