- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 249
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-17
|
¦^´_ 1# a703130 - Sub ex()
- Set d = CreateObject("Scripting.Dictionary")
- For Each sh In Sheets
- d(sh.Name) = d.Count
- Next
- With Sheet1
- For Each a In .Range("F:F").SpecialCells(xlCellTypeConstants, xlNumbers)
- If d.exists(a.Offset(, -4).Text) Then
- With Sheets(a.Offset(, -4).Text)
- Set c = .Columns("A").Find(Split(a.Offset(, -5), "_")(1), lookat:=xlWhole)
- If Not c Is Nothing Then
- i = 1
- k = Application.Count(c.Offset(1, 2).Resize(2, 8))
- For x = 2 To 1 Step -1
- For y = 8 To 1 Step -1
- b = c.Offset(1, 2).Resize(2, 8).Cells(x, y)
- If IsNumeric(b) Then
- mystr = IIf(mystr = "", Application.Small(c.Offset(1, 2).Resize(2, 1).EntireRow, i), mystr & "," & Application.Small(c.Offset(1, 2).Resize(2, 1).EntireRow, i))
- i = i + 1
- Else
- mystr = IIf(mystr = "", "", mystr & ",")
- End If
- Next
- Next
- a.Offset(, 1) = mystr
- mystr = ""
- End If
- End With
- Else
- a.Offset(, 1) = ""
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|