- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2014-2-28 12:24 ½s¿è
¦^´_ 5# ippo380
¥»VBA code ¦b¤U¦C±ø¥ó¤U, ¤~¯à¥¿±`¹B§@
1. "·sªºsheet" ¼ÐÃD¦Cªº ¦WºÙ, ¦p 3¤ë¡B4¤ë¡B5¤ëµ¥ªº¶¶§Ç À³»P ¤u§@ªí ªº ¦WºÙ¶¶§Ç ¤@P
2, "·sªºsheet" ÄæAªº¦WºÙ, ¦p¡i«D¥¿Â¾û¤uÁ~¸ê¡j¡B¡i«D¥¿Â¾û¤uÁ~¸ê¡jµ¥ªº¶¶§Ç,
À³»P VBA ¤¤
findStr = Array("«D¥¿Â¾û¤uÁ~¸ê", "¥¿Â¾û¤uÁ~¸ê", "c", "d")
ªº ¶¶§Ç ¤@P
3. "·sªºsheet" ÄæAªº¦WºÙ, ¦p¡i«D¥¿Â¾û¤uÁ~¸ê¡jµ¥«e«á§¡¤£¯à¦³ªÅ¥Õ
¦p¤U¹Ï¡G
´ú¸Õµ²ªG¦p¤U¡G
- Option Explicit
- Option Base 1
- Private Sub ·J¾ãButton_Click()
- Dim Sh, newSh As Object
- Dim i, j, shcnt As Integer
- Dim findStr
- Dim findC As Range
-
- Set newSh = ThisWorkbook.Sheets("·sªºsheet")
- findStr = Array("«D¥¿Â¾û¤uÁ~¸ê", "¥¿Â¾û¤uÁ~¸ê", "c", "d")
-
- shcnt = ThisWorkbook.Sheets.Count
- For j = 1 To shcnt - 1
- Set Sh = Sheets(j)
- If Sh.Name <> "·sªºsheet" Then
- For i = 1 To 4
- Set findC = Sh.Columns(1).Find( _
- What:=findStr(i), _
- After:=Sh.[A1], _
- LookIn:=xlValues, _
- LookAt:=xlWhole)
- If Not findC Is Nothing Then
- newSh.Cells(i + 1, j + 1).Value = findC.Offset(0, 2)
- End If
- Next
- End If
- Next
- End Sub
½Æ»s¥N½X ¦h³øªí¾ã²z.7z
http://www.mediafire.com/download/2vwo28i7wvd59dh/%E5%A4%9A%E5%A0%B1%E8%A1%A8%E6%95%B4%E7%90%86.7z |
|