????? ????? ????? ????? Excel ??? ???? ??????

?????? ????????? ?????? ?????????
???? ???????: 833402 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?????

???? ??????? ????? ??????? ???? Microsoft Visual Basic for Applications (VBA) ?? Microsoft Excel ???? ?????? ????? ??????? ??? ???? ?????? ???????? ???????? ???? ??????? ???? ??????.

??? ???? ??????? ??? ????? ?????? ??? ?? ??? ???? ?????? ?????? "AD".

??????? ????

???? Microsoft ??????? ???????? ???? ??????? ???? ??? ?? ???? ???? ?? ????. ?????? ??? ???????? ??? ???? ?????? ?? ?????? ???????? ??????? ?????? ???????? ?? ???????? ???? ????. ????? ??? ??????? ??? ????? ??? ??? ??????? ???? ??? ????? ???????? ????????? ?????? ????????? ????????. ???? ??????? ????? ??? Microsoft ??? ??????? ?????? ?????? ????? ???? ?? ?????? ?????? ??? ??????? ?????? ????? ?????? ?? ????? ??????? ?????? ??????? ?????.
???? ?????? ConvertToLetter ?? ???? ??????? ?????????? ???????:
  1. ???? ??? ?????? ??? ??? ?? ?? ???? ????? ?????? ?? ??????? "i".
  2. ???? ??? ?????? ?? ??????? "i" ??????? ?? ??? ?? ?? ???? ??????? ?? ??????? "j".
  3. ?? ?????? ??? ??????? ??? ?????? ???????? ???????? ???? ?????? ????????? "i" ?"j" ?? ? ??? ?? ??? ???????.
??? ???? ??????: ??? ?????? ??.
  1. ???? ???? ??? ?????? ??? ??: ?? / ?? = ?.????? ???? ?????? ?????? Int ??? "?".
    i = 1
  2. ??? ?????? ?????? - (i × ??) = ?? -(? × ??) = ?? - ?? = ?.
    j = ?
  3. ?? ?????? ????? ??????? ??? ???? ?????? ???? ??????
    i = ? = "A"
    j = ? = "D"
  4. ??? ?????? ????? ????? ???? ?????? "AD".
???? VBA ??????? ?? ????? ????? ??? ?????? ??? ????? ??????? ??? ?????? ???????? ???????? ???????:
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 > ? Then
      ConvertToLetter = Chr(iAlpha + 64)
   End If
   If iRemainder > ? Then
      ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64)
   End If
End Function
?????? ???? ??? ?????? ??? ?????? ??????? ???? ??? ??????? ????? ?? ???? ???? ???? ???????? ??????? ???????? ???. ?? ???? ??? ?? ???? ???? ?????? ?? ??????? ????? ????? ???????.

???????

???? ???????: 833402 - ????? ??? ??????: 30/?? ??????/1427 - ??????: 4.0
????? ???
  • Microsoft Office Excel 2007
  • Microsoft Office Excel 2003
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 97 Standard Edition
????? ??????: 
kbcodesnippet kbcode kbhowto KB833402

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com