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

[µo°Ý] ReDimªº¥Îªk

[µo°Ý] ReDimªº¥Îªk

¥Ñ©óHeadSone³o­Ó°}¦C¤j¤p¬OÅܰʪº,³Ì¤j¤£·|¶W¹L25,©Ò¥H§Ú¥ý«Å§i¥Lªº¤j¤p¬°25;·í²Å¦X§Ú©Ò­qªº±ø¥ó®É´N±N¬Y¤@½d³ò«ü©wµ¹HeadSone...²Å¦X±ø¥óªº¶µ¼Æ¦³¦h¤Ö­ÓHeadSoneªº¤j¤p´N·|¬O¦h¤Ö,§Ú¦b³o¸Ì°µ¤@­Ó­p¼Æ¾¹j ¥Î¨Ó­pºâHeadSoneªº¤j¤p¦A§Q¥ÎReDim Preserve HeadSone¥h§ïÅÜ°}¦C¤j¤p
§Úªº°ÝÃD¬O¥²¶·ÃB¥~¨Ï¥Îj¨Ó­pºâ¸ÓÅܼƪº¤j¤p¶Ü?¦³¤èªk¥i¥H¬Ù²¤jÅýHeadSoneª½±µ§ïÅܤj¤p¶Ü?
'-------------------------------------------------------------------------------------
ReDim HeadSone(25)
t1 = 0
t2 = 0
j = 0
For fsi = 15 To 238
    If Cells(fsi, 5) = Cells(fsi + 1, 5) And Cells(fsi, 5) <> Cells(fsi - 1, 5) Then t1 = fsi
    If Cells(fsi, 5) = Cells(fsi - 1, 5) And Cells(fsi, 5) <> Cells(fsi + 1, 5) Then t2 = fsi
        If t1 <> 0 And t2 <> 0 Then
            Set HeadSone(j) = Range(Cells(t1, 5), Cells(t2, 5))
            HS_S(j) = t1
            HS_E(j) = t2
            j = j + 1
            t1 = 0
            t2 = 0
        End If
Next fsi
m = j - 1   '¦@¦³m-1²Õ
ReDim Preserve HeadSone(m)
For j = 1 To UBound(HeadSone)
    Cells(15 + j, 6) = Application.Index(HeadSone(j), 1, 1)
Next j

m = j - 1   '¦@¦³m-1²Õ
    Cells(15 , 6).resize(m,1) = Application.transpose(HeadSone)
ª½±µ¶K¤W¥i¤]¡A¤£­n´`Àô

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD