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

[µo°Ý] ¦pªG¦b¥H¦X¨ÖªºÀx¦s®æ¤¤·j´M¯S©w¦r¦ê?

[µo°Ý] ¦pªG¦b¥H¦X¨ÖªºÀx¦s®æ¤¤·j´M¯S©w¦r¦ê?

½Ð°Ý¦U¦ì«e½ú

¤p§Ì¥Ø«e¦³°µ¤@­Ó¤å¥ó,¹J¨ìÂI³Â·Ð

¦pÃD,§Ú¦b¤@­Ó¤u§@ªí¤¤¦³a,b sheet

b sheet ªº¨C¤@¦C¤W¬Ò¦³­È

¦Ó§Ú­n±q b sheet ªº­È¸ò a sheet¤¤¤ñ¸û¬O§_¦³¤@¼Ëªº,¦pªG¦³«K¼W¥[§Ú·Q­nªºªF¦è

¦ý¬O a sheet ¤¤ §Ú­n´M§äªº¦a¤è column 4~10 ¬O¦X¨ÖÀx¦s®æ
½Ð°Ý§Ú­n¦p¦ó´M§ä??

·Ð½Ð¤£§[½ç±Ð,ÁÂÁÂ

Question.rar (1.62 KB)

©êºp¨S¦³¸Ô²Ó»¡©ú§Úªº°ÝÃD

¦pªþ¥ó

§Ú»Ý­n±q "Sheets b" ªºcells(3,5) ©¹¤U§ä,¹J¨ì¨C¤@­ÓTest «K·|·j´M"Sheets a" column 4 ¬O§_¦³¬Û¦PÃöÁä¦r
¦pªG¦³«h±N"Sheets b" Item 6~9 ¬Û¥[©ñ¦bÃöÁä¦r«á­±,°ÝÃD¦b"Sheets a" ¤Wcolumn 4¬O¦X¨ÖÀx¦s®æ©Ò¥H§Ú¤£ª¾¹D¦p¦ó·j´M

¨Ò¦p
a Sheets  cells(2,4)µ²ªG                  
Test_1(4),Test_2(8)
Test_2(8)
Test_1(4)

Test_3

¤£ª¾¹D«e½ú¬O§_¯à²z¸Ñ§Úªº°ÝÃD..

TOP

¦^´_ 2# a703130
¬O³o¼Ë¶Ü?
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xi As Integer, W As String, Rng As Range
  4.     With Sheets("b")
  5.         xi = 3
  6.         Do While .Cells(xi, 5) <> ""
  7.            If .Cells(xi, 5) Like "Test*" Then
  8.                 W = "(" & Application.Sum(.Cells(xi, 6).Resize(, 4)) & ")"   '«á­±4Ä檺¥[Á`
  9.                 Set Rng = Sheets("a").Range("D2")
  10.                 Do
  11.                    Rng.Replace .Cells(xi, 5), .Cells(xi, 5) & W     'Replace ¤èªk
  12.                    Set Rng = Rng.Offset(1)
  13.                 Loop While Rng<>""
  14.             End If
  15.             xi = xi + 1
  16.         Loop
  17.     End With
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# a703130
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With Sheets("b")
  4.    For Each a In .Range(.[E3], .[E3].End(xlDown))
  5.       d(a & "") = "(" & Application.Sum(a.Resize(, 5)) & ")" '¥[Á`
  6.    Next
  7. End With
  8. With Sheets("a")
  9. .Columns("D").Replace "(*)", "" 'ÁÙ­ì
  10.    For Each ky In d.keys
  11.       .Columns("D").Replace ky, ky & d(ky)   '¨ú¥N
  12.    Next
  13. End With
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¦U¦ì¤j¤jÀ°¦£

Range ¸ò Find ¯u¥O¤HÃø¥H²z¸Ñªü~"~

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD