- ©«¤l
- 222
- ¥DÃD
- 56
- ºëµØ
- 0
- ¿n¤À
- 285
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2010-8-30
- ³Ì«áµn¿ý
- 2024-4-22
|
¥»©«³Ì«á¥Ñ oak0723-1 ©ó 2010-9-10 19:48 ½s¿è
¦^´_ 4# oobird
¨ä¹ê¤p§Ì´N¬O¦b±´°Q¤§«eoobird¤j¤j§AÀ°¤p§Ì¼gªº¨º2Óµ{¦¡½X
µ{¦¡½X1>
Private Sub CommandButton1_Click()
Dim rng, arr, i%, j%, k%
With Sheets("1")
rng = .Range(.[c10], .[m83].End(3))
End With
ReDim arr(1 To UBound(rng), 1 To 10)
For i = 1 To UBound(rng)
If rng(i, 11) - rng(i, 10) <> 0 Then
k = k + 1
For j = 1 To 6
arr(k, j) = rng(i, j)
Next
arr(k, 8) = rng(i, 8) - rng(i, 6)
arr(k, 9) = arr(k, 8) - arr(k, 6)
arr(k, 10) = rng(i, 11) + rng(i, 10)
End If
Next
Sheets("2").UsedRange = ""
Sheets("2").[a5].Resize(k, 10) = arr
End Sub
³o®ÉªºkȬO¤°»ò
©Ò¥H¤p§Ì¥Î
¥H¤Uµ{¦¡½X¥h¸Õ
µ{¦¡½X2>
Dim rng, arr, i%, j%, k%
With Sheets("1")
rng = .Range(.[c10], .[m83].End(3))
End With
ReDim arr(1 To UBound(rng), 1 To 10)
For i = 1 To UBound(rng)
If rng(i, 11) - rng(i, 10) <> 0 Then
k = k + 1
For j = 1 To 6
arr(k, j) = rng(i, j)
Next
arr(k, 8) = rng(i, 8) - rng(i, 6)
arr(k, 9) = arr(k, 8) - arr(k, 6)
arr(k, 10) = rng(i, 11) + rng(i, 10)
End If
Next
[q9] = k
µ²ªG¦pªþ¥ó«öÁätest3°õ¦æµ²ªG
¦bªþ¥ó¤¤°õ¦æµ²ªG¬O18
¨º¬O¤£¬O¦bµ{¦¡½X1¤¤ªº³Ì«á¨º2¦æµ{¦¡½X¤¤ªºkÈ´N¬O18?
Y¬O~~~¤p§Ì´N§ó¤£À´¤F~~~~
Sheets("2").UsedRange = ""
Sheets("2").[a5].Resize(k, 10) = arr
©Î³\¤p§Ì¹ïResizeªº·N¸q¦³©Ò»~¸Ñ~~~~
©Î®Ú¥»¤£À´Sheets("2").[a5].Resize(k, 10) = arr³o¥yµ{¦¡½Xªº·N«ä~~~
ÁٷниѴb~~~ |
|