看板 Office 關於我們 聯絡資訊
VBA 版本 檔案位置: http://file.wikidot.com/local--files/f/20250223_VBA_Xlookup.xlsm 可以按 Alt+F11 查看程式碼 Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("D2:E2"), Range(Target.Address)) _ Is Nothing Then Cells(2, 3).Formula2 = "=XLOOKUP(A1#,'C:\Users\家人\Desktop\01月\[" & _ Right("00" & Cells(2, 4), 2) & Right("00" & Cells(2, 5), 2) & _ "-出貨單.xlsx]清單'!$A:$A,'C:\Users\家人\Desktop\01月\[" & _ Right("00" & Cells(2, 4), 2) & _ Right("00" & Cells(2, 5), 2) & "-出貨單.xlsx]清單'!$B:$B,"""")" End If End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.58.193 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1740322500.A.D62.html
randyus: 多謝大大的分享,開啟學習VBA的坎苛路程中 XD 02/24 00:12
windknife18: 不客氣,以祝你學習順利 :) 02/24 10:03