- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¦U¦ì°ª¤â¦n,§Ú·Q½Ð±Ð¤@¤U
§Ú¦³¤@¥÷ÃöÁä¦r²M³æ¨Ã¤w¤ÀÃþ¦n
²{¦b¦³¤@¥÷½Òµ{¦WºÙn¨Ó¬d¸ß¥XÃöÁä¦r
¥Ø«e¥i¬d¥X ...
hasrhgni µoªí©ó 2014-12-19 16:51
§Ú²q§Aªºµ²ªG¬On¹³ Sheet4 ¤¤©ÒÅã¥Üªº±¡§Î,
µ{¦¡×§ï¦p¤U:- Dim iCol%
- Dim strSA$, strC$, strA$, strca$, Dilimiter$ '©w¸q¦r¦êÅܼơA¥Î¨Ó©Ó±µ½d³ò¦WºÙ
- strSA = "class_name" '«Ý·j´M¦r¦êªº½d³ò¦WºÙ(¾ï¦â½d³ò)
- strC = "keyword" '±ý¦b(¬õ¦â½d³ò)¤¤·j´MªºÃöÁä¦r(ÂŦâ½d³ò)
- strA = "Answer" '¥Î¨Ó©Ó±µµª®×ªº½d³ò¦WºÙ(¬õ¦â½d³ò)
- strca = "catalog"
- Dilimiter = "," '¥Î¨Ó°µ¬°°Ï¹j²Å¸¹ªºÅܼơA¤è«K«áÄò¤å®Ñ³B²z¥Î
- For i = 1 To Range(strSA).Rows.Count 'Range("½d³ò¦WºÙ")´N¬O¤@Ó¤u§@ªí¤¤ªº"½d³ò¦WºÙ"©Ò¥Nªíªº½d³ò
- For j = 1 To Range(strC).Rows.Count '.Rows.Count ¬°Á`¸ê®Æ¦æ¼Æ
- If InStr(Range(strSA).Cells(i + lIns, 1), Range(strC).Cells(j, 1).Value) <> 0 Then
- With Range(strA).Cells(i, 1)
- iCol = .Offset(, Columns.Count - 2).End(xlToLeft).Column - 1
- .Offset(, iCol) = Range(strC).Cells(j, 1).Offset(0, -1)
- End With
- End If
- Next
- Next
½Æ»s¥N½X ¦pªG§Anªº¬O B Äæ©ñ¥þ³¡ÁäÈ,
¦ý¥H , °µ°Ï¹jªº¸Ü´N§ï¦¨©³¤U³o¼Ë:- Dim strSA$, strC$, strA$, strca$, Dilimiter$ '©w¸q¦r¦êÅܼơA¥Î¨Ó©Ó±µ½d³ò¦WºÙ
- strSA = "class_name" '«Ý·j´M¦r¦êªº½d³ò¦WºÙ(¾ï¦â½d³ò)
- strC = "keyword" '±ý¦b(¬õ¦â½d³ò)¤¤·j´MªºÃöÁä¦r(ÂŦâ½d³ò)
- strA = "Answer" '¥Î¨Ó©Ó±µµª®×ªº½d³ò¦WºÙ(¬õ¦â½d³ò)
- strca = "catalog"
- Dilimiter = "," '¥Î¨Ó°µ¬°°Ï¹j²Å¸¹ªºÅܼơA¤è«K«áÄò¤å®Ñ³B²z¥Î
-
- For i = 1 To Range(strSA).Rows.Count 'Range("½d³ò¦WºÙ")´N¬O¤@Ó¤u§@ªí¤¤ªº"½d³ò¦WºÙ"©Ò¥Nªíªº½d³ò
- Range(strA).Cells(i, 1) = ""
- For j = 1 To Range(strC).Rows.Count '.Rows.Count ¬°Á`¸ê®Æ¦æ¼Æ
- If InStr(Range(strSA).Cells(i + lIns, 1), Range(strC).Cells(j, 1).Value) <> 0 Then
- With Range(strA).Cells(i, 1)
- If .Value <> "" Then
- .Value = .Value & Dilimiter & Range(strC).Cells(j, 1).Offset(0, -1)
- Else
- .Value = Range(strC).Cells(j, 1).Offset(0, -1)
- End If
- End With
- End If
- Next
- Next
½Æ»s¥N½X |
|