Hello
I'm not understanding your question 100% and would prefer if you posted the full question here - in years to come that link may not work and people looking at this thread won't have the full context.
There is an in-built function in Excel to get the mode value.
Assuming the data is in cells B2:B16 then the mode is calculated like this:
=MODE(B2:B16)
To get the 2nd mode (in other words the second most frequent number), you can use an array formula like this where the value from the first formula is in cell F2:
{=MODE(IF(B2:B16<>F2,B2:B16))}
This is an array formula - do NOT enter the curly brackets{}, instead enter the formula without the curly brackets and before you press the Enter key, instead press Ctrl & Shift and while holding these 2 keys down then press the Enter key. The curly brackets will appear automatically in the formula bar.
To get the 3rd mode, the array formula looks like this:
{=MODE(IF(B2:B16<>F2,IF(B2:B16<>F3,B2:B16)))}
same deal with the Ctrl + Shift + Enter.
Again, this assumes the first mode has already been worked out in cell F2 and the second mode value has been worked out in cell F3.
I trust this helps.
Andrew