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

[µo°Ý] VBA¥[Á`°ÝÃD

  1. Sub abc()
  2. Dim mycolumn, i
  3. mycolumn = Mid(Cells(2, 9).End(xlToRight).Address, 2, 1)
  4. For i = 2 To 4
  5. Cells(i, 2) = Application.Sum(Range("I" & i & ":" & mycolumn & i))
  6. Next i
  7. End Sub
½Æ»s¥N½X
­º¦¸¦b³o¸Ì´£¨Ñcode,¤£ª¾¼g±o¦p¦ó?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

  1. Sub abc()
  2. Dim mycolumn As String, mystring As String, myarray, i
  3. myarray = Split(Cells(2, 9).End(xlToRight).Address, "$", -1)
  4. mycolumn = myarray(1)

  5. For i = 2 To 4
  6. Cells(i, 2) = Application.Sum(Range("I" & i & ":" & mycolumn & i))
  7. Next i
  8. End Sub
½Æ»s¥N½X
¦hÁÂH¤j,§ï¨}¤F³o¤@ÂI,§Q¥Îsplit¤èªk®M¨úcolumn¦C
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD