ÅÜ°Ê°}¦C©T©w°}¦C¤£¬O¥Hdim©Mredim°Ï¥÷?
- ©«¤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
|
ÅÜ°Ê°}¦C©T©w°}¦C¤£¬O¥Hdim©Mredim°Ï¥÷?
½Ð°Ý
¬°¦ó¥H¤Uªº°}¦C¬O©T©w°}¦C?
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
¥H¤U¬°¦ó¬OÅÜ°Ê°}¦C
a = Sheets("1").[c10].CurrentRegion
r = 1
For i = 1 To UBound(a)
ReDim Preserve arr(1 To 3, 1 To r)
arr(1, r) = a(i, 1): arr(2, r) = a(i, 2): arr(3, r) = a(i, 3)
r = r + 6
Next |
|
|
|
|
|
|
- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
ReDim arr(1 To UBound(rng), 1 To 10)
¦pubound(rng)¬°100
¨äµ²ªG¬°arr(1 to 100,1 to 10)
·íÄÝ©T©w°}¦C¡C
r = 1
For i = 1 To UBound(a)
ReDim Preserve arr(1 To 3, 1 To r)
arr(1, r) = a(i, 1): arr(2, r) = a(i, 2): arr(3, r) = a(i, 3)
r = r + 6
next
²Ä¤@Ói´`Àô®Ér=1,arr(1 To 3, 1 To r)=arr(1 to 3,1 to 1)
²Ä2Ói´`Àô®Ér=7,arr(1 To 3, 1 To r)=arr(1 to 3,1 to 7)
²Ä3Ói´`Àô®Ér=13,arr(1 To 3, 1 To r)=arr(1 to 3,1 to 13)
³o¼Ë´N¥s°ÊºA°}¦C¡C |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 2# oobird
À´¤F
·P®¦~~~ |
|
|
|
|
|
|
- ©«¤l
- 16
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 25
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-9
- ³Ì«áµn¿ý
- 2013-11-12
|
¦^´_ 3# Hsieh
½Ð°Ýª©¥D §Ú²{¦b·Q°µ°ÊºA°}¦C (¨Ì¸ê®Æ¤§Äæ¼Æ¡B¦C¼Æ§ïÅÜ°}¦Cºû¼Æ)
®æ¦¡¤j·§¦p¤U
1 listname 1 listname2 listname3 <- ³o¦C©l²×«O¯d
2 itemA itemB itemC
3 itemD itemE itemF
4 itemG itemH itemI
¨CÓ°}¦C³£»Ýnnlistname³o¦C ¨Ã¥B¨CÓ°}¦C¥[¤J²Ä2¦C©Î²Ä3¦C©Î²Ä¥|¦C
¨Ã¥B¥i¯à¥H¬YÓÅܼÆ(°²³]¬°i)°µ©I¥s
³o¼Ë¬O§_¥i¥H¥Îredim preserveªº¤èªk¶i¦æ©O?? |
|
|
|
|
|
|
- ©«¤l
- 16
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 25
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-9
- ³Ì«áµn¿ý
- 2013-11-12
|
¥»©«³Ì«á¥Ñ rick4615 ©ó 2013-8-16 16:14 ½s¿è
¦^´_ 6# Hsieh
©êºp@@ §Ú¨S¦³Á¿²M·¡
§Ú²{¦b¤j·§¬O°µ¨ì³o¼Ë
test.rar (30.22 KB)
¥ý·s¼Wcheckbox ¬Ý¥´¤Ä´XÓcheckbox ¨Ã¥B±Ncheckbox¹ïÀ³¤§Äæ¦ì¶i¦æ¿é¥Xªº°Ê§@
²{¦b¬O»Ýn±N¼ÐÃD (©m¦W¡B¨°ª¡BÅé«¡B¸y³ò)
»P¤º®e(¤ý¤p©ú¡B170¡B80¡B34)
°µ¦¨¤@Ó°}¦C 2* i ¤§°}¦C (i¬°checkbox¥´¤Äªº¼Æ¶q)
¨Ã¥B©l²×«O«ù¼ÐÃD¦C ¤º®e¨Ì±¡§Î§ó§ï
°þ §Ú³o¼ËÁ¿¦³¤ñ¸û²M·¡¶Ü@@ ¤p§Ì§Ú¤£¬O«Ü¾Õªøªí¹F QQ
¤]·PÁ±zªº¸Ñµª :) |
|
|
|
|
|
|
- ©«¤l
- 16
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 25
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-9
- ³Ì«áµn¿ý
- 2013-11-12
|
¥»©«³Ì«á¥Ñ rick4615 ©ó 2013-8-19 09:14 ½s¿è
¦^´_ 8# Hsieh
QQ ¬Ý¤F§Ñ°O¦^
°þ §Ú¤£¤ÓÀ´²M³æ¤º®e¬O¤°»ò
¤£¹L§Ú«á¨Ó¥H¦Û¤vªº¤èªk¼g¥X¨Ó¤F
¤]ªþ¤W¤p§Ìªº¼gªk@@
ReDim Myarray(1, q - 1) As Variant
of = 2
For c = 4 To items + of
i = 1
a = 0
For Each CK In ActiveSheet.OLEObjects '1 next
If CK.Name Like "CheckBox*" Then '2 end §PÂ_checkbox
If CK.Object.Value = True Then '3 end §PÂ_true/false
If q > 1 Then
Myarray(0, a) = Cells(3, i)
Myarray(1, a) = Cells(c, i)
a = a + 1
End If
End If
i = i + 1
End If
Next
Csvgo.writetext Myarray(0, 0) & "," & Myarray(0, 1) & vbCrLf & Myarray(1, 0) & "," & Myarray(1, 1) & vbCrLf
Next c |
|
|
|
|
|
|