程序代码:
Public Function GetNumValue(ByVal rg As Range) As String Dim strValue As String Dim r, i, c, j As Integer strValue = rg.Value r = rg.Row c = rg.Column j = 0 For i = 1 To r If Cells(i, c).Value = strValue Then j = j + 1 End If Next GetNumValue = "第" & j & "个:" & rg.Value End Function