Find the mode for multiple fields formula

Printed From: Crystal Reports Book — Forum Name: Technical Questions

How do I find the mode of multiple fields?

I have 10 fields each has the possibility of answers 1-5

so lets say that they were answered like the following:

Q1:2
Q2:2
Q3:4
Q4:5
Q5:2
Q6:3
Q7:2
Q8:4
Q9:2
Q10:1

the mode would then be 2 but how do I write this into a formula?