n½T»{¬Y¤@°}¦C¬O§_¦s¦b®É¸Ó¥Î¤°»ò¤èªk§PÂ_?
ReDim HeadSone(20)
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²Õ
If HeadSone(0) = Empty Then '§PÂ_HeadSone(0)¬O§_¦s¦b
m = 0
Else
m = j - 1 '¦@¦³m-1²Õ
End If
ReDim Preserve HeadSone(m)
·íHeadSone(0)¤£¦s¦b®É¤Wz¼gªkOK,¥i¬O·íHeadSone(0)¤£¦s¦b®É¤Wz¼gªk´N·|¥X²{¿ù»~(«¬ºA¤£²Å¦X)
§ï¦¨:
If HeadSone(0) = Is Nothing Then
m = 0
Else
m = j - 1 '¦@¦³m-1²Õ
End If
·íHeadSone(0)¤£¦s¦b®É«h·|¥X²{¿ù»~(¦¹¦¸»Ýnª«¥ó),¥i¬O·íHeadSone(0)¤£¦s¦b®É¸Ó¼gªk´NOK
½Ð°ÝIs Nothing»PEmptyªº¥Îªk¦³¦ó¤£¦P?¸Ó¦p¦ó§ï? |