Countif Formula inc Trim

  • Hi,


    I am working on a countifs formula to find cells which meet specific criteria. However I find the outcome incorrect because some cells have leading/trailing spaces. I cannot work out how to include a trim into this formula.


    My formula so far is:

    =(SUM(COUNTIFS((P21:FK21), {"Z","","B","#"})))


    Can anyone help with this?

    Krayna