Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grabbing Data from another File

I need to automatically take data from another excel file. At the moment,
I've put a formula into the cells to say that A1 = Cell A1 of 'File
Directory + Name'. This means that I have to keep dragging down the formulas
on the worksheet to get the latest rows of data. Is there a macro (or
something else) that will allow me to update the data automatically without
having to copy the formulas down?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Grabbing Data from another File

You could have a macro copy the formulas down

--
Regards,
Tom Ogilvy


"Thriller" wrote in message
...
I need to automatically take data from another excel file. At the moment,
I've put a formula into the cells to say that A1 = Cell A1 of 'File
Directory + Name'. This means that I have to keep dragging down the

formulas
on the worksheet to get the latest rows of data. Is there a macro (or
something else) that will allow me to update the data automatically

without
having to copy the formulas down?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grabbing Data from another File

Could you help me with the macro please?

"Tom Ogilvy" wrote:

You could have a macro copy the formulas down

--
Regards,
Tom Ogilvy


"Thriller" wrote in message
...
I need to automatically take data from another excel file. At the moment,
I've put a formula into the cells to say that A1 = Cell A1 of 'File
Directory + Name'. This means that I have to keep dragging down the

formulas
on the worksheet to get the latest rows of data. Is there a macro (or
something else) that will allow me to update the data automatically

without
having to copy the formulas down?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Grabbing Data from another File

How do you determine how far to copy them?

Otherwise

sub Applyformula()
Range("A1").Resize(1000,20).Formula = "='C:\My
Folder\[MyFile.xls]Sheet1'!A1"
End Sub

or

Sub Applyformula
res = InputBox("Enter Number of Rows")
if res < "" then
if isnumeric(res) then
Range("A1").Resize(res,20).Formula = _
"='C:\My Folder\[MyFile.xls]Sheet1'!A1"
end if
end if
End sub

--
Regards,
Tom Ogilvy


"Thriller" wrote in message
...
Could you help me with the macro please?

"Tom Ogilvy" wrote:

You could have a macro copy the formulas down

--
Regards,
Tom Ogilvy


"Thriller" wrote in message
...
I need to automatically take data from another excel file. At the

moment,
I've put a formula into the cells to say that A1 = Cell A1 of 'File
Directory + Name'. This means that I have to keep dragging down the

formulas
on the worksheet to get the latest rows of data. Is there a macro (or
something else) that will allow me to update the data automatically

without
having to copy the formulas down?






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
Auto-filter not grabbing all the data JerseyJ Excel Discussion (Misc queries) 2 May 14th 10 05:30 PM
Grabbing data between worksheets andrew Excel Discussion (Misc queries) 4 July 7th 08 05:39 AM
grabbing data from another website [email protected] Excel Discussion (Misc queries) 1 July 4th 08 08:26 PM
Grabbing data from 1 sheet to place in another prem New Users to Excel 1 May 3rd 08 12:47 PM
grabbing data from MS Word nims Excel Programming 3 August 19th 05 01:10 PM


All times are GMT +1. The time now is 06:43 PM.

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

About Us

"It's about Microsoft Excel"