I have a very simple SWITCH statement in Google Sheets:
=switch(
D2,"",B2,
D2,"A","A",
D2,"B","B",
"Default"
)
If I put any non-blank value in D2, I always get A back, even if I put B or anything else (one or more characters). If I leave D2 blank, I correctly get B2's value. It's as if any non-blank string is equal to "A" as SWITCH does the comparison. But that's certainly not what the documentation and many other websites offering examples of SWITCH say should happen.
Is this a bug in Sheets or what am I misunderstanding?
My real use case is far more than 3 cases, so please don't advise me to use nested IFs instead.