- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
[¤À¨É] ±q¦hÓ¤À¶¸ê®Æ§â¦X¨Ö¨ì¥D¶
¥»©«³Ì«á¥Ñ kimbal ©ó 2010-8-3 22:06 ½s¿è
§â¤À¶¸ê®Æ¦X¨Ö¨ì¥D¶ªº¤èªk
³æ¯Â§âÄæ§Û¥X,¤£°µ·JÁ`.
·JÁ`ªº¸Ü, ½Ð¥ý¤F¸Ñ¤º«Ø"¼Ï¯Ãªí"©M"¦X¨Ö·JÁ`"¥Îªk
Äæ¦ì¦ì¸m¤£©ë,¦ýAÄ欰¥DÁä(¥i¤â¤u½Õ¸`),
¤À¶¥i¥H¤£©ñÄæ¦ì.
¦pªGÄæ¦W¸ò¥D¶¤£¤@P,¥i¦b¥D¶Äæ¦ìµù¸Ñ¤W¶ñ¤W,¥Î¨§¸¹¤À¹j
°£¥DÁä¥~¨ä¥LÄ椺®e¥i¥H¬°ªÅ.
Åwªï¯d·N¨£/°Q½×- Option Explicit
-
- Public Sub refresh_all()
- Dim shtCurr As Worksheet
- Dim rngHeader As Range, rngResult As Range, strHeaderArray, strHeader
- Dim lngLastPosition As Long
- With ActiveSheet
- .[A1].CurrentRegion.Offset(1).Clear
- lngLastPosition = 2
- For Each shtCurr In Sheets
- If shtCurr.Name <> .Name Then
- For Each rngHeader In .[A1].CurrentRegion.Rows(1).Cells
- If (rngHeader.Comment Is Nothing) Then
- strHeaderArray = Split(rngHeader.Value)
- Else
- strHeaderArray = Split(rngHeader.Comment.Text & "," & rngHeader.Value, ",")
- End If
- For Each strHeader In strHeaderArray
- Set rngResult = shtCurr.Rows(1).Find(strHeader, LookIn:=xlValues, LookAt:=xlWhole)
- If Not rngResult Is Nothing Then
- shtCurr.Range(rngResult.Offset(1), _
- rngResult.Offset(rngResult.CurrentRegion.SpecialCells(xlCellTypeLastCell).Row - 1)).Copy Destination:= _
- .Cells(lngLastPosition, rngHeader.Column)
- Exit For
- End If
- Next
- Next
- lngLastPosition = .Cells(Rows.Count, 1).End(xlUp).Row + 1
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X ·PÁÂGBKEE¤j¥X¤â¬Û§U²¤Æ, ɪá·q¦ò, ¦A¥[¨ÇªF¦è. |
|