Forum Discussion

packie's avatar
packie
Brass Contributor
Sep 08, 2024
Solved

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")
  • Riny_van_Eekelen's avatar
    Sep 08, 2024

    packie 

    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.