¦X¨Ö¦hÓ¤u§@ªí¤º¸ê®Æ©ó·s¼W1¤u§@ªí
- ©«¤l
- 56
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- Window7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-25
- ³Ì«áµn¿ý
- 2016-1-17
|
¦X¨Ö¦hÓ¤u§@ªí¤º¸ê®Æ©ó·s¼W1¤u§@ªí
»Ýn¦X¨Ö¦hÓ¤u§@ªí¤º¸ê®Æ©ó·s¼W1¤u§@ªí
¥B¨Ì¤u§@ªí¼ÐÅҲΤ@§e²{©ó·s¼Wªº¤u§@ªí¤¤ªº¬Y¤@Äæ
¥Ø«e¥HVBA¶×¤J¦h¤å¦r¸ê®Æ¦ý¤ÀÄݤ£¦PÀÉ®×
¦X¨Ö¼Æ¾Ú-1¡B¦X¨Ö¼Æ¾Ú-2¡B¦X¨Ö¼Æ¾Ú-3
¦ý§Æ±æ¶×¤J¸ê®Æ§e²{¦p ªþ¥ó¤¤ªº ¦X¨Ö¼Æ¾Ú .xls
¶×¤J¸ê®Æ³B²z¤è±ÁÙ OK¥B¸ê®Æ¦h¡A´N¨Ì»Ý¨D²¤Æ¦¨ªþ¥ó¤¤ªº¸ê®Æ
¤£ª¾¬O§_¯à¥HVBA ¤è¦¡´î¤Ö¥Ø«e¤â°Ê¤è¦¡³B²z§@·~¡A
·Ð½Ð¬O§_°ª¤â¥i¨ó§U³B²z¸Ñ¨M¡A·P®¦¡I¡I
¦X¨Ö¼Æ¾Ú.rar (9.58 KB)
|
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 15
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-12
|
- Sub nn()
- Dim iI%, iRowEnd%, iTarRow%
- Dim sGroup$
- Dim vMer
-
- Set vMer = Sheets("¦X¨Ö")
- iTarRow = 2
-
- For iI = 1 To Sheets.Count
- With Sheets(iI)
- If .Name <> vMer.Name Then
- sGroup = .Name
- iRowEnd = .Cells(Rows.Count, 1).End(xlUp).Row
- .Range(.Cells(2, 1), .Cells(iRowEnd, 2)).Copy
- With vMer
- .Paste Destination:=.Cells(iTarRow, 1)
- .Cells(iRowEnd + iTarRow - 2, 3) = sGroup
- .Range(.Cells(iTarRow, 3), .Cells(iRowEnd + iTarRow - 2, 3)).FillUp
- End With
- iTarRow = iRowEnd + iTarRow - 1
- End If
- End With
- Next iI
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 56
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- Window7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-25
- ³Ì«áµn¿ý
- 2016-1-17
|
·PÁÂluhproªº¨ó§U¡A´ú¸Õ²Å¦X»Ý¨D
¥¿¦b¬ã¨s±zªº»yªkÀ³¥Î©ó»Ý¨D¤¤¡A
¦ý¥H§Úªº¥\¤O»P®É¶¡¡AÁÙ»Ýn¤@¨Ç®É¶¡¡AY¦³°ÝÃD¦A¦V±z°Q±Ð
¬Û«H¤@©w¯à¥\¯à¤j¼W¡A·P®¦ |
|
|
|
|
|
|
- ©«¤l
- 56
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- Window7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-25
- ³Ì«áµn¿ý
- 2016-1-17
|
®tÂI³£§Ñ°O¦^¨Ó¬Ý¬Ý¦Û¤vªº°ÝÃD¡A·Q¤£¨ìÁÙ¦³¨ä¥L¤è¦¡
¬ã¨s¤¤¡AGBKEEª©¤j«á±ÁÙ¤S¥[µù¸Ñ¡A¹ï©ó¾Ç²ß¤¤ªº§Ú¤F¸ÑÀ³¸Ó·|§Ö¨Ç
©ñ°²®É¬ã¨s¡A¦³°ÝÃD¦A°Q±Ð¡A·P®¦ |
|
|
|
|
|
|
- ©«¤l
- 56
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- Window7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-25
- ³Ì«áµn¿ý
- 2016-1-17
|
¾Ç²ß¤¤¡A¹ï©ó»yªkÀ´±o¤£¦h¡A·Ð½Ð GBKEEª©¤j«ü¾É¤@¤U
iRowEnd = Sheets(i).Cells(Rows.Count, 1).End(xlUp).Row
ªº·N¸q¬°¦ó?
Ãö©ó Ar = Sheets(i).Range("A2:B" & iRowEnd).Value ¤¤ªº Range ("A2:B" & iRowEnd)ªº·N«ä¬O?
¤@¤U¤ln±q°ò¥»VBA»{ª¾¸õ¨ì¬Ý±oÀ´ª©¤jªº»yªk¡A«ç»ò"»¡©ú"»P¤u¨ã®Ñ³£¥¢®ÄÅo¡I¡I |
|
|
|
|
|
|
- ©«¤l
- 56
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- Window7
- ³nÅ骩¥»
- OFFICE2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-25
- ³Ì«áµn¿ý
- 2016-1-17
|
Dim Ar()
GBKEE µoªí©ó 2011-7-6 08:52
Ar() ¬°«Å§i¬°°}¦CªºÁY¼g¶Ü¡H
Resize(UBound(Ar), 2)
GBKEE µoªí©ó 2011-7-6 08:52
¾Ç²ß ResizeÀ³¥Î¡A¸`¿ý »¡©úÀɶ¶¹D¶K¤W¨Ñ°Ñ¦Ò
¦ý¨ä¤¤ UBound(Ar)ªº§t¸q»P¥Îªk¬°¦ó?- Resize ÄÝ©Ê
- ½Ð°Ñ¾\½Ð°Ñ¾\½Ð°Ñ¾\½Ð°Ñ¾\½Õ¾ã«ü©wªº½d³ò¡C¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí½Õ¾ã«áªº½d³ò¡C
- expression.Resize(RowSize, ColumnSize)
- expression ¥²¿ï¡C¸Ó¹Bºâ¦¡¶Ç¦^n½Õ¾ã¤j¤pªº Range ª«¥ó¡C
- RowSize ¿ï¾Ü©Êªº Variant¡C·s½d³ò¤¤©Ò¥]§tªº¦C¼Æ¡C¦pªG¬Ù²¤¦¹¤Þ¼Æ¡A½d³ò¤¤ªº¦C¼Æ«O«ù¤£ÅÜ¡C
- ColumnSize ¿ï¾Ü©Êªº Variant¡C·s½d³ò¤¤©Ò¥]§tªºÄæ¼Æ¡C¦pªG¬Ù²¤¦¹¤Þ¼Æ¡A½d³ò¤¤ªºÄæ¼Æ«O«ù¤£ÅÜ¡C
- ½d¨Ò
- ¦¹½d¨Ò½Õ¾ã Sheet1 ¤¤¿ï¾Ü½d³òªº¤j¤p¡A¨Ï¤§¼W¥[¤@¦C©M¤@Äæ¡C
- Worksheets("Sheet1").Activate
- numRows = Selection.Rows.Count
- numColumns = Selection.Columns.Count
- Selection.Resize(numRows + 1, numColumns + 1).Select
-
- ¦¹½d¨Ò°²³]¦b Sheet1 ¤¤¦³¤@Ó¥]§t¼ÐÃD¦Cªºªí®æ¡C¦¹½d¨Ò¿ï©w¸Óªí®æ¡A¦ý¤£¿ï©w¼ÐÃD¦C¡C°õ¦æ¦¹½d¨Ò¤§«e¡A²{¥ÎÀx¦s®æ¥²¶·³B©ó¸Óªí®æ¤¤¡C
- Set tbl = ActiveCell.CurrentRegion
- tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, _
- tbl.Columns.Count).Select
½Æ»s¥N½X |
|
|
|
|
|
|