I want to replace one value with another. For instance, if the result of an expression is 0, I want to replace it with an empty string. I don't want to repeat the expression, or use an intermediate cell.
For example, instead of this:
=IF(VLOOKUP(A1,B:C,2,FALSE)=0,"",VLOOKUP(A1,B:C,2,FALSE))I would like something like this, if there were a "CASE" function that did what I want:
=CASE(VLOOKUP(A1,B:C,2,FALSE),0,"")Is there a function or syntax that does this?
I suppose I could do this:
=regexreplace(vlookup(A1,B:C,2,FALSE),"^0$","")...but that's a bit ugly and probably very inefficient.








