ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ®Ú¾Ú¥Ø«e¦r¦ê¨ì¨ä¥L¤u§@­¶·j´M¦r¦ê¨Ã¶ñ¦^­È

[µo°Ý] ®Ú¾Ú¥Ø«e¦r¦ê¨ì¨ä¥L¤u§@­¶·j´M¦r¦ê¨Ã¶ñ¦^­È

¤p§Ì²{¦³­ÓÀÉ®×­n½Ð«e½ú­ÌÀ°¦£
»Ý­n¨D±oªþ¥óªºget
test.rar (4.52 KB)
·í§Ú¦b sheet("1")ªº Index ¬Ý¨ì¦³¼Æ¦r®É¥L«K·|¨ì Name ¥h§ì¦r¦ê

¤§«á¨ì sheet("a") ªºÄæ¦ì¤¤§ä¨ì¤@¼Ëªº¦r¦ê«á¶ñ¤J sheet("1") ªºget Äæ¦ì

¦ý¬O­n·Ó¶¶§Ç¶ñ¤J­Y¹J¨ì ¤@ «h¸õ¹L

¨Ò¦p¡G
index §ä¨ì 1 ¹ï·Ó¨ì  a_tool1 ¤§«á¨ì sheet("a") §ä¨ì tool1
¦bSheet("1") ªº get Äæ¦ì¶ñ¤J¡G1,2,3,4,5,6,7,8,,,,,11,12,13

§Ú¥Ø«e·Q¨ìªº¤è¦¡
  1. Dim S As Integer
  2. Dim get As String
  3. If FlagIndex = "¦³­È" Then
  4.        S = Name - Mainpage - "_"
  5.        get =GetS (S)
  6. Else
  7.         Status = ""
  8. End IF
  9. Function GetS(Byval s As String) As String
  10.         §PÂ_sheet("a") ¬O§_¦³ S ¦r¦ê
  11. End Function
½Æ»s¥N½X
¤£ª¾¹D«e½ú­Ì¬O§_¦³¸Ñ??

¦^´_ 1# a703130
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. For Each sh In Sheets
  4. d(sh.Name) = d.Count
  5. Next
  6. With Sheet1
  7. For Each a In .Range("F:F").SpecialCells(xlCellTypeConstants, xlNumbers)
  8.    If d.exists(a.Offset(, -4).Text) Then
  9.     With Sheets(a.Offset(, -4).Text)
  10.     Set c = .Columns("A").Find(Split(a.Offset(, -5), "_")(1), lookat:=xlWhole)
  11.     If Not c Is Nothing Then
  12.     i = 1
  13.     k = Application.Count(c.Offset(1, 2).Resize(2, 8))
  14.     For x = 2 To 1 Step -1
  15.        For y = 8 To 1 Step -1
  16.           b = c.Offset(1, 2).Resize(2, 8).Cells(x, y)
  17.           If IsNumeric(b) Then
  18.              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))
  19.              i = i + 1
  20.            Else
  21.              mystr = IIf(mystr = "", "", mystr & ",")
  22.            End If
  23.         Next
  24.     Next
  25.     a.Offset(, 1) = mystr
  26.     mystr = ""
  27.     End If
  28.     End With
  29.     Else
  30.     a.Offset(, 1) = ""
  31.     End If
  32. Next
  33. End With
  34. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD