Forum Discussion
Return text value instead of 0
Rather than return a 0 is it possible to return a text value instead?
=COUNTIFS(Trades!$R$5:$R$1099,D37,Trades!$O$5:$O$1099,">0")
I see three options:
=IF (COUNTIFS(---------), COUNTIFS(---------), "text")
Or if you want to avoid the repetition of the entire COUNTIF part and you are using a modern Excel version,
=LET(
c, COUNTIFS(---------),
if(c, c, "text")
)
Or you could leave the outcome to be zero and use a custom format like General:General;"text"
This will display the "text" although the underlying value is still zero.
2 Replies
- Riny_van_EekelenPlatinum Contributor
I see three options:
=IF (COUNTIFS(---------), COUNTIFS(---------), "text")
Or if you want to avoid the repetition of the entire COUNTIF part and you are using a modern Excel version,
=LET(
c, COUNTIFS(---------),
if(c, c, "text")
)
Or you could leave the outcome to be zero and use a custom format like General:General;"text"
This will display the "text" although the underlying value is still zero.
- packieBrass ContributorI have gone for your second option:
=LET(
c, COUNTIFS(---------),
if(c, c, "text")
)
This gave the outcome I think will do.
Thank you 🙂