# Formula to calculate the percentage of occurrences in a range of cells w/ 2 criteria

Good afternoon!

I am trying to calculate the percentage of occurrences within a range of cells in a row that contain either the yellow or green bubble symbols. I can get it to work properly for 1 criteria (or color of bubble) but not for either of 2 colors. How do I get the below formula to divide the number of green OR yellow bubbles by all entries in the range? Would be grateful for any assistance!

• You pretty much had it,

=SUM(COUNTIF([Column52]@row:[Column55]@row, ="Green"), COUNTIF([Column52]@row:[Column55]@row, ="Yellow")) / COUNT([Column52]@row:[Column55]@row)

Hope it helps, Thanks

Paul

• Perfect! Thank you so very much @Paul McGuinness! I knew I was close, but couldn't see my error. Very grateful for the help!!

• You pretty much had it,

=SUM(COUNTIF([Column52]@row:[Column55]@row, ="Green"), COUNTIF([Column52]@row:[Column55]@row, ="Yellow")) / COUNT([Column52]@row:[Column55]@row)

Hope it helps, Thanks

Paul

• Perfect! Thank you so very much @Paul McGuinness! I knew I was close, but couldn't see my error. Very grateful for the help!!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!