- ©«¤l
- 234
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 276
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-7
- ³Ì«áµn¿ý
- 2021-10-7
|
¦^´_ 1# boomf2
¥\¤O¨S«Ü¦n,¸Õ¸Õ¬Ý!!
Sub ex()
Application.ScreenUpdating = False
Source1 = Application.GetOpenFilename
x = InputBox("¬d¸ß¦ì¸m")
Workbooks.Open Source1
Windows("Workbook2.xlsm").Activate
r = [a65535].End(3).Row
[N2].Resize(r - 1) = "=VLOOKUP(A2,[" & Dir(Source1) & "]Sheet1!A:F," & x & ",FALSE)"
[M2].Resize(r - 1) = "=VLOOKUP(A2,[" & Dir(Source1) & "]Sheet1!A:F," & x + 1 & ",FALSE)"
[L2].Resize(r - 1) = "=VLOOKUP(A2,[" & Dir(Source1) & "]Sheet1!A:F," & x + 2 & ",FALSE)"
Workbooks(Dir(Source1)).Close False
Application.ScreenUpdating = True
End Sub
§Ú¬O¥ÎM2 & L2,¦pªGn§ï¬°M3 & L3,½Ð±NM2 & L2§ï¦¨M3 & L3§Y¥i
¦ÓªÅ®æM3µ¥©óN2¦^¶Ç¸ê®Æ½d³òÄæ¼Æ+1 => VLOOKUP($A:$A,[Database.xlsx]Sheet1!$A:$F,3,0) ¨Ó¦^¶ÇÈ.
¦ÓªÅ®æL3µ¥©óN2¦^¶Ç¸ê®Æ½d³òÄæ¼Æ+2 => VLOOKUP($A:$A,[Database.xlsx]Sheet1!$A:$F,4,0) ¨Ó¦^¶ÇÈ. |
|