ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] ±Ncellsªº¼Æ¦rÄæ§ï¬°rangeªº¤å¦rÄæ

[¤À¨É] ±Ncellsªº¼Æ¦rÄæ§ï¬°rangeªº¤å¦rÄæ

Function Col(C%)
  Col = IIf(C < 27, "", Chr(Int((C - 1) / 26) + 64)) & IIf(C Mod 26 = 0, "Z", Chr(C Mod 26 + 64))
End Function

Function Col(C%)
  Col = IIf(C < 27, "", Chr(Int((C - 1) / 26) + 64)) & IIf(C Mod 26 = 0, "Z", Chr( ...
Min µoªí©ó 2010-5-9 22:12



    2007¤w¤£¼Å¨Ï¥Î
  1. Function ColumnName(Rng As Range)
  2. ColumnName = Split(Rng.AddressLocal, "$")(1)
  3. End Function
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤£¦n·N«ä¡A¸ô¹L·Q½Ð±Ð¤@¤U
²Ä¤G±Æªºµ{¦¡½X ColumnName = Split(Rng.AddressLocal, "$")(1)
«á­±ªº(1) ¬OÔ£·N«ä?

¤p§Ì¾Ç²L¡A§Æ±æ¦U¦ì¤j¤j«ü±Ð

TOP

¦^´_ 3# mave
  1. Function ColumnName(Rng As Range)
  2.     ColumnName = Split(Rng.AddressLocal, "$")(1)
  3.     '  Rng.AddressLocal : "$AB$1" : String
  4.     '  Split(Rng.AddressLocal, "$")(0) : ""   : String
  5.     '  Split(Rng.AddressLocal, "$")(1) : "AB" : String
  6.     '  Split(Rng.AddressLocal, "$")(2) : "1"  : String
  7.     '  ColumnName : "AB" : Variant/String
  8. End Function
½Æ»s¥N½X

TOP

¦^´_ 3# mave
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar As Variant, I As Integer
  4.     Ar = Array("AA", "BB", "CC")  '°}¦C
  5.     For I = 0 To UBound(Ar)
  6.         MsgBox Ar(I)    '°}¦Cªº²Ä´X­Ó¤¸¯À
  7.     Next
  8.     '********Split¶Ç¦^°}¦C
  9.     Ar = "AA_BB_CC"
  10.     For I = 0 To 2
  11.         MsgBox Split(Ar, "_")(I)   '°}¦Cªº²Ä´X­Ó¤¸¯À
  12.     Next
  13. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁ¼ӤW¨â¦ì¤j¤jªº¦^µª
¤Q¤À·PÁÂ

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD