·Q½Ð±Ð,±q¦hÓ¬¡¶Ã¯§ä¨ìÃöÁä¦r«á½Æ»s¤U¤@¦C,¦ý¤@ª½¦³¿ù»~
- ©«¤l
- 8
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 10
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-12-12
- ³Ì«áµn¿ý
- 2016-4-13
|
·Q½Ð±Ð,±q¦hÓ¬¡¶Ã¯§ä¨ìÃöÁä¦r«á½Æ»s¤U¤@¦C,¦ý¤@ª½¦³¿ù»~
·Q½Ð±Ð,±q¦hÓ¬¡¶Ã¯§ä¨ìÃöÁä¦r«á½Æ»s¤U¤@¦C,¦ý¤@ª½¦³¿ù»~
Sub ex()
Dim Ar(), i%, C$, A As Range
With Sheets(1) '²Ä¤@±i¤u§@ªí
C = "¨¤ÀÃҩβΤ@ÃÒ¸¹" 'n¿z¿ïªºÈ
For i = 2 To Sheets.Count '±q²Ä2±i¤u§@ªí¶}©l¦^°é
With Sheets(i)
For Each A In .UsedRange.Columns(1).Cells 'AÄæ¤w¨Ï¥ÎÀx¦s®æ°µ°j°é
If A = C Then '¦pªG»Pn¿z¿ïªºÈ¬Û¦P
ReDim Preserve Ar(s)
Ar(s) = A.Offset(1).Resize(, 11) '±N¸Ó¦CA:kÄæ¼g¤J°}¦C
s = s + 1
End If
Next
End With
Next
.[A4].CurrentRegion.Offset(1).ClearContents '²M°£Â¦³¸ê®Æ
If s > 0 Then .[A5].Resize(s, 11) = Application.Transpose(Application.Transpose(Ar)) 'Y¦³²Å¦X¶µ¥Ø«h¼g¤J¤u§@ªí1ªºA5¥H¤U¦ì¸m
End With
End Sub
¦b³o¤@¦æ¤@ª½¥X²{¿ù»~"13"«¬ºA¤£²Å¦X,§Ú¤£ª¾¬O§_§Úªº¬¡¶Ã¯¤Ó¦h,¨ä¹ê¬¡¶Ã¯¦@¦³¬ù500¶,¦pªG§Ú1~60¶«O¯d,¨ä«á³£§R±¼,´N¨S¦³¿ù»~
If s > 0 Then .[A5].Resize(s, 11) = Application.Transpose(Application.Transpose(Ar)) 'Y¦³²Å¦X¶µ¥Ø«h¼g¤J¤u§@ªí1ªºA5¥H¤U¦ì¸m
¤£ª¾¥i§_À°¦£¸Ñ¨M,¦pªG¯à¦³§ì¦P¤@¸ê®Æ§¨¤ºªº.xlsxÀɮפèªk´N¥i¦n¤F,§Ú´N¤£¥Î±NÀɮתº¬¡¶Ã¯¶ë¨ì¦P¤@Ó.xlsxÀɸÌ,§Úªº¨CÓÀÉ¥u¦³¤@Ó¬¡¶Ã¯
201407-12_error.zip (929.88 KB)
|
|
§V¤O¾Ç²ß
|
|
|
|
|
- ©«¤l
- 181
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 197
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2000
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2014-3-9
- ³Ì«áµn¿ý
- 2024-4-29
|
¸g´ú¸Õ Application.Transpose
¥i¯à¬O bug ©Î ¦³¨î°}¦C¼Æ¶q
¥H¤U½d¨Ò
ReDim a(1 To 11, 0 To 495) ' ------- ok
g = Application.Transpose(a)
ReDim a(1 To 11, 0 To 496) ' ------ err msg «¬ºA¤£²Å
g = Application.Transpose(a) |
|
|
|
|
|
|
- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-12-26 15:06 ½s¿è
¦^´_ 1# hasrhgni
Application.Transpose ,°}¦Cªº¤¸¯À¦r¤¸¼Æ¤j©ó255 Ó¦r¤¸,·|¦³¿ù»~- Option Explicit
- Sub Ex()
- Dim Ar(), i%, C$, A As Range, XX As Integer, Msg As Boolean
- Dim S As Integer
- With Sheets(1) '²Ä¤@±i¤u§@ªí
- C = "¨¤ÀÃҩβΤ@ÃÒ¸¹" 'n¿z¿ïªºÈ
- For i = 2 To Sheets.Count '±q²Ä2±i¤u§@ªí¶}©l¦^°é
- With Sheets(i)
- For Each A In .UsedRange.Columns(1).Cells 'AÄæ¤w¨Ï¥ÎÀx¦s®æ°µ°j°é
- If A = C Then '¦pªG»Pn¿z¿ïªºÈ¬Û¦P
- ReDim Preserve Ar(S)
- '**** °£¿ùµ{¦¡ §ä¥XÄæ¼e¨î¦b 255 Ó¦r¤¸¥H¥~ªºÀx¦s®æ ********
- Msg = False
- For XX = 1 To 11
- ' Äæ¼e¨î¦b 255 Ó¦r¤¸¥H¤º
- If Len(A(2, XX)) > 255 Then
- Sheets(i).Activate
- A.Select
- Debug.Print Sheets(i).Name & " ¤u§@ªí [" & A.Address & "]"
- Debug.Print A(2, XX)
- Debug.Print "¦r¤¸:" & Len(A(2, XX))
- Msg = True
- End If
- Next
- If Msg Then
- Debug.Print
- Application.VBE.Windows("§Y®É¹Bºâ").Visible = True
- Stop
- Else
- Application.VBE.Windows("§Y®É¹Bºâ").Visible = False
- End If
- '************ °£¿ùµ²§ô ****************************************
- Ar(S) = A.Offset(1).Resize(, 11) '±N¸Ó¦CA:JÄæ¼g¤J°}¦C
- S = S + 1
- End If
- Next
- End With
- Next
- .[A4].CurrentRegion.Offset(1).ClearContents '²M°£Â¦³¸ê®Æ
- If S > 0 Then .[A5].Resize(S, 11) = Application.Transpose(Application.Transpose(Ar)) 'Y¦³²Å¦X¶µ¥Ø«h¼g¤J¤u§@ªí1ªºA7¥H¤U¦ì¸m
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 181
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 197
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2000
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2014-3-9
- ³Ì«áµn¿ý
- 2024-4-29
|
¸g´ú¸Õ Application.Transpose
¥i¯à¬O bug ©Î ¦³¨î°}¦C¼Æ¶q
¥H¤U½d¨Ò
ReDim a(1 To 11, 0 To ...
bobomi µoªí©ó 2014-12-26 07:45
³oÓ°ÝÃD
Excel 2000 --> ·|¥X²{¿ù»~°T®§
Excel 2014 --> ¤£·|¥X²{¿ù»~°T®§ |
|
|
|
|
|
|
- ©«¤l
- 8
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 10
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-12-12
- ³Ì«áµn¿ý
- 2016-4-13
|
·PÁ ª©¥DGBKEE ªºÅçµýµ{¦¡,´À§Ú¸Ñ¨M°ÝÃD
·PÁ bobomi ªº¼ö¤ß¦^ÂÐ,ÁÂÁ |
|
§V¤O¾Ç²ß
|
|
|
|
|