Is there an IFS type function for text? (if A1 is blank, use B1, etc.)

Is there a function for using the first non-blank text expression the result? I attempted to use the SWITCH function, but it seems restricted to a single expression (e.g.: A1). Below is my attempt before testing with text expressions. It works for numeric ones.

=IFS(AND(N6="",O6<>""),O6,AND(O6="",P6<>""),P6,AND(P6="",Q6<>""),Q6,AND(Q6="",R6<>""),R6,AND(R6="",N6=""),"",N6,N6)

Hello,

this should work

=IFERROR(IFS(NOT(ISBLANK(A1)),A1,NOT(ISBLANK(B1)),B1),"all empty")

Hope that helps.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Have a nice day and let’s (continue to) “Be excellent to each other!”

I couldn’t get this to work for me. Took out the “…” and then the 2nd to last line, but I kept getting an Err:50x result.

I guess the Linebreaks were your problem, i guess i should have places the example in one line, … i’ll fix it
But newbie-02 example is a little shorter with the <> operator, so i guess that makes it a bit more appealing.

yes, it is, (imho)

=IFS(A3<>"";A3; A4<>"";A4; A5<>"";A5)

add more cases as you like …

“nested if’s” would work as well, but often confuse coders once there are too many parentheses …

P.S. ‘solved marks’ and ‘likes’ welcome,
click the grey circled hook - ✓ - top left to the answer to turn it green if the problem is solved,
click the “^” above it if you ‘like’ the answer,
“v” if you don’t,
do not! use ‘answer’ to add info to your question, either edit the question or add a comment,
‘answer’ only if you found a solution yourself …

This worked, thanks. I just had to end the loop by adding something to the end (see below).

=IFS(N6<>"",N6, O6<>"",O6, P6<>"",P6, P6="", "")