Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default reference cells in 2 sep files

John,

Use something like

Worksheets("Sheet1").Cells(i,j).Value = _
Workbooks("Book2.xls").Worksheets("Sheet2").Cells( i,j).Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"John" wrote in message
...
Hi all,

i wish to popolate cell(i,j) in one Excel File with values
from a sheet inanother Excel File.
e.g.
sheets("Sheet1").cells(i,j) = Sheets("Sheet2").cells(i,j)

but how do i refer to cells in a different file altogether?
i've tried this (but it doesn't work!)

Sheets("Sheet1).cells(i,j) = Windows("FileA.xls").Sheets
("Sheet1").cells(i,j)

TIA,
John.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default reference cells in 2 sep files

Thanks Chip,

that's worked a treat!

john.
-----Original Message-----
John,

Use something like

Worksheets("Sheet1").Cells(i,j).Value = _
Workbooks("Book2.xls").Worksheets("Sheet2").Cells

(i,j).Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"John" wrote in message
...
Hi all,

i wish to popolate cell(i,j) in one Excel File with

values
from a sheet inanother Excel File.
e.g.
sheets("Sheet1").cells(i,j) = Sheets("Sheet2").cells

(i,j)

but how do i refer to cells in a different file

altogether?
i've tried this (but it doesn't work!)

Sheets("Sheet1).cells(i,j) = Windows("FileA.xls").Sheets
("Sheet1").cells(i,j)

TIA,
John.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference constant cells in different files from a master workbook Byron Excel Worksheet Functions 1 November 18th 09 05:58 PM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
Indirect Reference to Other files Danny Lewis Excel Discussion (Misc queries) 6 July 13th 06 04:19 PM
Reference different files using vlookup intricatefool Excel Worksheet Functions 0 May 30th 06 03:08 PM
Need to reference different files using vlookup intricatefool Excel Worksheet Functions 0 May 30th 06 03:07 PM


All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"