Display fractions w/o reducing

How can I display a fraction as a fraction, without it reducing... i.e.- 5/5 or 10/10 instead of 1?
I need to use these fractions in a formula, so I can't change the format to general. The answer to the formula is correct, (I am averaging grades) but it is important for me to see both the denominator and the numberator on my spreadsheet, not just a 1 or # (which is what shows now.) Any help would be greatly appreciated!

Here's an improvement:

Private Sub Worksheet_Calculate()
    Dim c As Range, rng As Range, denom As Long, slashPos As Long
    Set rng = ActiveSheet.Range("C2:C100")
    For Each c In rng
        If c.HasFormula Then
            slashPos = InStr(1, c.Formula, "/", vbTextCompare)
            If slashPos > 0 Then
                denom = Mid(c.Formula, InStr(1, c.Formula, "/", vbTextCompare) + 1)
                c.NumberFormat = "?/" & denom
            End If
            c.NumberFormat = "General"
        End If
    Next c
End Sub

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated August 4, 2020 Views 4,685 Applies to: