½Ð°Ý¸ê®Æ¦X¨ÖpºâÁ`©Mn¦p¦ó¼g?
- ©«¤l
- 13
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-8-25
- ³Ì«áµn¿ý
- 2011-9-15
|
½Ð°Ý¸ê®Æ¦X¨ÖpºâÁ`©Mn¦p¦ó¼g?
ÀɮצpªþÀÉ
»¡©ú¡G
¤ñ¦pcÀɮתºÁ`©MÄæ¦ìn¥hpºâa©MbÀɮתº¸ê®Æ¤¤Àx¦s®æÁ`¼Æ¡A¦ýaÀɮפ¤ªº"d"©M"e"¸ê®Æª½±µ»PbÀɮפ¤ªº"f"¸ê®Æ¤@°_pºâ¦¨"f"¸ê®ÆªºÁ`©M¡A³oÓ¥¨¶°n¦p¦ó¼g¡H
My Documents.rar (16.76 KB)
|
|
|
|
|
|
|
- ©«¤l
- 13
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 22
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-8-25
- ³Ì«áµn¿ý
- 2011-9-15
|
¦^´_ 3# GBKEE
·PÁ¤j¤jªºÀ°¦£¡A°ÝÃD¤w¸Ñ¨M¤F¡I¡I |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 1# zaq370 - Sub Ex() 'A,B¨âÀɤw¶}±Ò
- Dim A_Rng As Range, B_Rng As Range, C_Rng As Range, i As Integer
- With Workbooks("A.XLSX").Sheets(1)
- Set A_Rng = .Range("i2", .[i2].End(xlDown))
- End With
- With Workbooks("B.XLSX").Sheets(1)
- Set B_Rng = .Range("i2", .[i2].End(xlDown))
- End With
- With Workbooks("C.XLSX").Sheets(1)
- Set C_Rng = .Range("B3", .[B3].End(xlDown))
- End With
- C_Rng.Offset(, 1) = ""
- For i = 1 To C_Rng.Count
- If i < C_Rng.Count Then
- C_Rng(i, 2) = Application.CountIf(A_Rng, C_Rng(i)) + Application.CountIf(B_Rng, C_Rng(i))
- Else
- C_Rng(i, 2) = A_Rng.Count + B_Rng.Count - Application.Sum(C_Rng.Offset(, 1))
- End If
- Next
- Set A_Rng = Nothing
- Set B_Rng = Nothing
- Set C_Rng = Nothing
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 231
- ¥DÃD
- 55
- ºëµØ
- 0
- ¿n¤À
- 293
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- KEELUNG
- µù¥U®É¶¡
- 2010-7-24
- ³Ì«áµn¿ý
- 2018-8-28
|
§A¦n
½Ð¸Õ¸Õ¦p¤U
Sub aa()
'½Ð¥ý¥Ñ¤u¨ã³]©wMicrosoft Scripting Rungtime
Dim mSht As Worksheet
Dim mDic As Scripting.Dictionary
Dim mKey, mItem
Dim mArr
Dim mRng As Range, E As Range
Dim s%, s1%
Set mDic = CreateObject("scripting.dictionary")
mArr = Array("a", "b")
For i = 0 To 1
With Workbooks.Open(ThisWorkbook.Path & "\" & mArr(i) & ".xlsx")
With .Sheets(1)
Set mRng = .Range("i2:i" & .[i65536].End(xlUp).Row)
End With
For Each E In mRng
If mDic.Exists(E.Value) = False Then
mDic(E.Value) = 1
Else
mDic(E.Value) = mDic(E.Value) + 1
End If
Next
mKey = mDic.Keys
mItem = mDic.Items
.Close
End With
Next
For i = 0 To mDic.Count - 1
If mKey(i) = "d" Then
s = mItem(i)
End If
If mKey(i) = "e" Then
s1 = mItem(i)
End If
Next
For i = 0 To mDic.Count - 1
If mKey(i) = "f" Then
mItem(i) = mItem(i) + s + s1
End If
Next
'Set mRng = Range("b3:b" & [b65536].End(xlUp).Row) '
'
'For Each E In mRng 'ª©¥D¤j¤j¬O§_¥iÀ°¤p§Ì¸Ñ´b¬°¦ó¦¹»yªkµLªk¥¿½T¨ú¥XdictionaryªºitemsÈ©O¡H
' E.Offset(, 1) = mDic(E.Value) '¦¹³¡¥÷¦³°ÝÃD
'Next
For i = 0 To mDic.Count - 1
Set mRng = Columns("b").Find(mKey(i), lookat:=xlWhole, searchorder:=xlByRows, searchdirection:=xlNext)
If Not mRng Is Nothing Then
mRng.Offset(, 1) = mItem(i)
End If
Next
End Sub |
|
|
|
|
|
|