- ©«¤l
- 262
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 280
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- HK
- µù¥U®É¶¡
- 2015-8-11
- ³Ì«áµn¿ý
- 2025-3-24

|
¦^´_ 4# dou10801 - Sub zz()
- Dim a, Title, b(), c&, n&, k&, r&, t&
- Title = [b2:f2].Value '¨ú¼ÐÃD
- c = UBound(Title, 2) '¨ú¼ÐÃDªø«×
- a = [b2].CurrentRegion.Value '¨úªí1ªº¸ê®Æ©ñ¤J a Array
- t = UBound(a, 2) / c - 1 'pºâªí1¤¤¼ÐÃDªº«½Æ¦¸¼Æ ¥H 0 ¶}©l¦Ü t, ¬°¥H¤U²Ä¤@´`Àô§@¦npºâ ,½Ð¬Ý @_@
- ReDim b(1 To UBound(a) * (t + 1), 1 To c + 1) '«Ø¥ß¤@Ó¸û¤jªº b Array
- For n = 0 To t '@_@
- k = n * c + c 'pºâ k ªºÈ, §Y¥X³f¼Æ¶q¦bTitle¤¤ªº¦ì¸m
- For i = 2 To UBound(a) '¥Ñ a ªº²Ä2¦æ´`Àô
- If a(i, k) Then '¦æ¦C¹ïÀ³¦³¥X³f¼Æ¶q, ¶i¦æ¥H¤Uµ{§Ç
- r = r + 1 '«Ø¥ß·s¦æ¼Æµ¹ b Array
- For j = 1 To c '´`Àô¼ÐÃDªø«×
- b(r, j) = a(i, k - c + j) '¨ú a Array ¤¤¬Û¹ï¦æ¦Cªº¸ê®Æµ¹ b Array
- Next '´`Àô
- b(r, c + 1) = b(r, 4) * b(r, 5) 'pºâª÷ÃB
- End If
- Next '´`Àô
- Next '´`Àô
- Workbooks.Add 1 '·s«Ø¤u§@ï
- [a1].Resize(1, c) = Title '¼g¤J¼ÐÃD
- Cells(1, c + 1) = "Amount" '¼g¤J·s¼ÐÃD
- [a2].Resize(r, c + 1) = b '±N b Array ¼g¤J
- [a1].CurrentRegion.Borders.Value = 1 'µe¤W®æ½u
- End Sub
½Æ»s¥N½X |
|