¥Ñ©ó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 |