¦p¦ó±qAªíÄæ¦ì¦WºÙ¥h·j´MBªí¹ïÀ³ªºÄæ¦ì¦WºÙ,¨Ã±NBªíªº¤º®e¶K¨ìAªí
- ©«¤l
- 18
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 24
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- s
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2018-5-7
- ³Ì«áµn¿ý
- 2022-8-9
|
¦p¦ó±qAªíÄæ¦ì¦WºÙ¥h·j´MBªí¹ïÀ³ªºÄæ¦ì¦WºÙ,¨Ã±NBªíªº¤º®e¶K¨ìAªí
Dearª©¤j
§Ú¼g¤F¤@ÓMarcoµ{¦¡¥h§ì¨ú¥t¥~¤@Ó¸ê®Æ(vsDataAnrFunction)ªº¤º®e,¸Óµ{¦¡¬O¥Î¤wª¾ªºÄæ¦ì(¦p:A,B,C...Äæ¦ì)¥h§ì¨ú,¦ý¥Ø«eµo²{¥un¸ê®Æ(vsDataAnrFunction)ªºÄæ¦ìÅܤF,´N·|¾ÉP§Ú®³¨ì¿ù»~ªº¸ê®Æ,©Ò¥H§Ú·Q½Ð°Ý¤j¤j,¦p¦ó¨Ï¥ÎÄæ¦ì¦WºÙ¥h§ì¨ú¸ê®Æ(vsDataAnrFunction)ªº¤º®e.
1206¸ß°Ý.rar (106.96 KB)
|
|
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-25
|
Sub MO()
Dim C&, R&, xD, xB As Workbook, Arr, Brr, U&, N&
Set xD = CreateObject("Scripting.Dictionary")
With Sheets("Dump")
.UsedRange.Offset(1, 0).EntireRow.Delete
For C = 1 To .Cells(1, .Columns.Count).End(xlToLeft).Column
xD(.Cells(1, C) & "") = C: N = N + 1
Next
End With
On Error Resume Next
Set xB = Workbooks("vsDataAnrFunction.csv")
On Error GoTo 0
If xB Is Nothing Then Set xB = Workbooks.Open(ThisWorkbook.Path & "\vsDataAnrFunction.csv")
Arr = xB.Sheets(1).UsedRange
ReDim Brr(1 To UBound(Arr), 1 To N)
For C = 1 To UBound(Arr, 2)
U = xD(Arr(1, C) & ""): If U = 0 Then GoTo 101
For R = 2 To UBound(Arr)
Brr(R - 1, U) = Arr(R, C)
Next R
101: Next C
xB.Close 0
Sheets("Dump").[A2].Resize(UBound(Arr) - 1, N).Value = Brr
End Sub
'================================ |
|
|
|
|
|
|
- ©«¤l
- 18
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 24
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- s
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2018-5-7
- ³Ì«áµn¿ý
- 2022-8-9
|
Dear ª©¤j
¯uªº«D±`ªº·PÁÂ~~
§Ú·|¬ãŪ¤@¤U,è¤~¬ãŪ¤@¤U¯uªº¦³µ{«×,§Ú·|google´M§ä,Y¦³ºÃ°Ý¦A½Ðª©¥D¸ÑÄÀ,(§Ú¼gªº´N¹³¥®¸X¶é¯Z¨Ì¼Ë) |
|
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-25
|
¥t¤è:
Sub MO_2()
Dim MyBook As Workbook, MySht As Worksheet, xR As Range, xF As Range
Dim FN$, xB As Workbook, xArea As Range
Application.ScreenUpdating = False
Set MyBook = ThisWorkbook '¥»ÀÉ
FN = "vsDataAnrFunction.csv" 'csvÀɮצWºÙ
On Error Resume Next: Set xB = Workbooks(FN): On Error GoTo 0 'ÀˬdcsvÀɬO§_¤w¶}±Ò
If xB Is Nothing Then Set xB = Workbooks.Open(MyBook.Path & "\" & FN) 'YcsvÀÉ¥¼¶}±Ò, ¶}±Ò¤§
Set xArea = xB.Sheets(1).UsedRange '³]©wcsvÀɸê®Æ½d³ò¬°rangeª«¥ó
'------------------------------------
Set MySht = MyBook.Sheets("Dump") '¥»Àɸê®Æ¤u§@ªí
MySht.UsedRange.Offset(1, 0).EntireRow.Delete '²M°£ì¦³¸ê®Æ(«O¯d¼ÐÃD¦æ)
For Each xR In Range(MySht.[A1], MySht.Cells(1, Columns.Count).End(xlToLeft))
Set xF = xArea.Rows(1).Find(xR, Lookat:=xlWhole) '³v¤@´M§äcsv²Ä¤@¦æ²Å¦X¼ÐÃD¤å¦rªº¦ì¸m
If xF Is Nothing Then GoTo 101 '§ä¤£¨ì²Å¦X®É, ²¤¹L
xR.Resize(xArea.Rows.Count).Value = xF.Resize(xArea.Rows.Count).Value '½Æ»s¾ãÄæ¸ê®Æ
101: Next
xB.Close 0
End Sub
'======================================= |
|
|
|
|
|
|