數字轉成字母(Excel):
Function ConvertToLetter(iCol As Integer) As String
   Dim iAlpha As Integer
   Dim iRemainder As Integer
   iAlpha = Int(iCol / 27)
   iRemainder = iCol - (iAlpha * 26)
   If iAlpha > 0 Then
      ConvertToLetter = Chr(iAlpha + 64)
   End If
   If iRemainder > 0 Then
      ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64)
   End If
End Function
文章標籤
全站熱搜
創作者介紹
創作者 Joel 的頭像
Joel

外星世界

Joel 發表在 痞客邦 留言(0) 人氣(543)