[µo°Ý] VBA ¤¤pºâ¼ÆÈ°ÝÃD
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
§Ú·Q½Ð°Ý¶W¯Åª©¥D, ¦pªG¥ÎVBA»yªk, ¦p¦ó§PÂ_¯x°}¤¤ªº¥ô¤@¼ÆȳQ§ïÅÜ, ¨Ã¥B¯à°÷Åý¥¦«·spºâ1.............1........3.......2........(1*1*3*2)
1.............1....... 2......1.........(1*1*3*1)
1/3.....1/2.......1.......3........(1/3*1/2*1*3)
¦A³Â·Ð±z~~ |
|
|
|
|
|
|
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
ÁÂÁ§A --- §Ú·|¦A½m²ß¬Ý¬Ý, ¦³°ÝÃD¦A³Â·Ð§AÅo~~ |
|
|
|
|
|
|
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
·Q¦A¸ß°Ý¶W¯Åª©¥D¡AY§Ú¦A¥[¤J¤@ÓÄæ¦ì¡A±q 3*3 ÅÜ 4*4, À³¸Ó«ç»òקï»yªk¡H(¬Ý¤F¦n¤[, ¤£¤Ó¤F¸Ñ ReDim ³o¥y»yªk)
1.............1........3.......2........(1*1*3*2)
1.............1....... 2......1.........(1*1*3*1)
1/3.....1/2.......1.......3........(1/3*1/2*1*3) |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# temple
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim myarray1(2 To 4, 2 To 4) As Single
- Dim AR As Variant
- Dim i As Integer, j As Integer
-
- myarray1(2, 2) = 10
- myarray1(2, 3) = 10
- myarray1(2, 4) = 3
-
- myarray1(3, 2) = 5
- myarray1(3, 3) = 17
- myarray1(3, 4) = 2
- myarray1(4, 2) = 1 / 3
- myarray1(4, 3) = 1 / 2
- myarray1(4, 4) = 1
-
- AR = myarray1
- ReDim Preserve AR(LBound(myarray1) To UBound(myarray1), LBound(myarray1, 2) To UBound(myarray1, 2) + 1)
-
- For i = LBound(AR) To UBound(AR)
- AR(i, UBound(AR, 2)) = Application.Product(Application.WorksheetFunction.Index(myarray1, i - LBound(AR) + 1))
- Next
-
- i = UBound(AR, 1)
- i = i - LBound(AR, 1) + 1 '²Ä¤@ºûªº¤¸¯À¼Æ
- j = UBound(AR, 2)
- j = j - LBound(AR, 2) + 1 '²Ä¤Gºûªº¤¸¯À¼Æ
-
- With ActiveSheet.Range("C5") '«ü©w·¡åJ®æ¦ì¸m
- .Resize(i, j) = AR 'ÂX¥Rªº½d³ò«ü©w¬°ArªºÈ
- End With
- End Sub
½Æ»s¥N½X |
-
1
µû¤À¤H¼Æ
-
|
|
|
|
|
|
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
¥ýÁÂÁ¶W¯Åª©¥Dªº«Øij, §Ú¬O·Q¦b¯x°}¤¤¦A¥[¤@ÓÄæ¦ì, ¥i¥H¦Û°Ê°µ rowªºpºâ, ¹³¤U±¨ºÓ¯x°}¤@¼Ë
1.............1........3.........(1*1*3)
1.............1....... 2........(1*1*3)
1/3.....1/2.......1........(1/3*1/2*1) |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 4# temple
¬O³o¼Ë¶Ü?- Option Explicit
- Sub Ex()
- Dim myarray1(2 To 4, 2 To 4) As Single
- Dim i As Integer, j As Integer
- i = UBound(myarray1, 1)
- i = i - LBound(myarray1, 1) + 1 '²Ä¤@ºûªº¤¸¯À¼Æ
- j = UBound(myarray1, 2)
- j = j - LBound(myarray1, 2) + 1 '²Ä¤Gºûªº¤¸¯À¼Æ
-
- myarray1(2, 2) = 1
- myarray1(2, 3) = 1
- myarray1(2, 4) = 3
-
- myarray1(3, 2) = 1
- myarray1(3, 3) = 1
- myarray1(3, 4) = 2
- myarray1(4, 2) = 1 / 3
- myarray1(4, 3) = 1 / 2
- myarray1(4, 4) = 1
- With Range("C5") '«ü©w·¡åJ®æ¦ì¸m
- .Resize(i, j) = myarray1 'ÂX¥Rªº½d³ò«ü©w¬°myarray1ªºÈ
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
|
|
|
|
|
|
¡@¼ÊºÙ: ªü¦N ¡@ÀY»Î: ¤£®¢¤U°Ý,¤£Â_¾Ç²ß,¤~·|¶i¨B
ª©¥D
- ©«¤l
- 647
- ¥DÃD
- 190
- ºëµØ
- 24
- ¿n¤À
- 1037
- ÂI¦W
- 0
- §@·~¨t²Î
- windows7
- ³nÅ骩¥»
- Office 2010 ; OOO3.0 ; Google
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¦Ë«n
- µù¥U®É¶¡
- 2010-5-2
- ³Ì«áµn¿ý
- 2022-6-24
|
1.±N©w¸q§ï¦¨ Dim myarray1(2 To 5, 2 To 5) As Single ´N¥i¥H
2.Àx¦s®æ ®æ¦¡§ï¦¨ ¤À¼Æ®æ¦¡ |
|
|
|
|
|
|
- ©«¤l
- 19
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2014-12-28
- ³Ì«áµn¿ý
- 2015-6-22
|
¸ß°Ý¯x°}³]p°ÝÃD
§Ú¼g¤F¤@Ó 4*4 ªº¯x°}, ¯x°}È·|¦³¤À¼Æ, ¦ý°õ¦æ«á < 0 ªº³¡¥÷³£Åã¥Ü 0
¦pªG¤~¯àÅý¥¦Åã¥Ü¤À¼Æ?
»yªk:
Dim myarray1(2 To 5, 2 To 5) As Integer
myarray1(2, 2) = 1
myarray1(2, 3) = 1
myarray1(2, 4) = 3
myarray1(2, 5) = 5
myarray1(3, 2) = 1
myarray1(3, 3) = 1
myarray1(3, 4) = 2
myarray1(3, 5) = 4
myarray1(4, 2) = 1 / 3
myarray1(4, 3) = 1 / 3
myarray1(4, 4) = 1
myarray1(4, 5) = 5
myarray1(5, 2) = 1 / 5
myarray1(5, 3) = 1 / 4
myarray1(5, 4) = 1 / 5
myarray1(5, 5) = 1
For i = 2 To 5
For j = 2 To 5
Cells(i, j).Value = myarray1(i, j)
Next j
Next i
End Sub |
|
|
|
|
|
|