Function CI(c) 'Cells.Address.Information
If IsNumeric(c) Then
On Error GoTo NumErr
CI = Replace(Cells(, c).Address(0, 0), 1, "")
Else
On Error GoTo TxtErr
CI = Range(c & 1).Column
End If
Exit Function
NumErr:
CI = "Not 1-" & Cells(Cells.Count).Column & " !": Exit Function
TxtErr:
CI = Cells(Cells.Count).Address(1, 0)
CI = "Not A-" & Left(CI, InStr(CI, "$") - 1) & " !": Exit Function
End Function
转自ExcelHome 香川群子
http://club.excelhome.net/thread-945200-1-1.html