以下是我跨檔案依指定儲存格值而取的另一檔案儲存格值所寫,但是.........我要從F4......G4......H4.....一直做到Z4,RANGE()的變動不會寫,只能一直COPY做.....:'(
還請老師指導....感謝!
Public Sub test()
Range("f4:f9") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" & [$d4] & ""
Range("f10:f14") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" & [$d10] & ""
Range("f15:f20") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" & [$d15] & ""
Range("g4:g9") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d4] & ""
Range("g10:g14") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d10] & ""
Range("g15:g20") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d15] & ""
end sub
更新1:
excel跨檔案指定儲存格取取儲存格值vba....已寫求簡化!