Formula to return fraction that represents the number of cells that meet certain criteria

Shelby
Shelby ✭✭✭✭✭
edited 03/11/21 in Formulas and Functions

I'd like to return a fraction such as 3/4 to show the number of cells that meet certain criteria. If it returned 3/4 that would mean 3 out of 4 cells met the criteria.

Currently, I'm using a percentage rating, but in my opinion, if you don't have at least 10 cells to evaluate, the percentage rating value isn't true in the scenario I'm using it in.


Tags:

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    edited 03/11/21

    Try one based on this:

    The COUNTIF statements count each cell that equals A, the JOIN converts the value to text, the second JOIN concatenates a "/3" at the end (3 being the number of cells you're counting.)


    This makes it easier to see the targets of the cell references:


    Regards,

    Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • Shelby
    Shelby ✭✭✭✭✭
    edited 03/11/21

    @JReisman27 thanks for the response. Shortly after I submitted my question I figured out a solution. Here's the formula I used:

    =COUNTIF([Toolbox Talks are completed & available for review]@row:[All Superintendents are OSHA 30 certified]@row, "Yes") + "/" + COUNT([Toolbox Talks are completed & available for review]@row:[All Superintendents are OSHA 30 certified]@row)



  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭

    @Shelby Cool! That solution seems a bit more elegant than mine!

    Regards,

    Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!