Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Importing a single cell from one .xls to another

I'm hoping you can help me find a simple method to a problem.

I was importing a .xls file using the External Data tool into my
worksheet which worked find.

I now have a requirement to import data from reports generated each
day, so importing the whole of a sheet each day might not be the
simpliest method.

Is it possible to enter a single value from an .xls file:
e.g.: ='C:\...\desktop\[test.xls]Sheet1'!A1 //output e.g. 22
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Importing a single cell from one .xls to another

Hi,

You could try a couple of ways.
1. Copy the cell in your source workbook (Edit - Copy) then select the cell
in the recieving workbook and then
Edit|Paste Special|Paste Link

or

Try this small macro in the recieving workbook.

Sub getdata()
Workbooks.Open Filename:="c:\book2.xls" 'source book change to suit
myvalue = Sheets("sheet1").Range("A1").Value
ActiveWorkbook.Close savechanges:=False
ThisWorkbook.Worksheets("Sheet1").Range("B1").Valu e = myvalue
End Sub

Mike

"AMaleThing" wrote:

I'm hoping you can help me find a simple method to a problem.

I was importing a .xls file using the External Data tool into my
worksheet which worked find.

I now have a requirement to import data from reports generated each
day, so importing the whole of a sheet each day might not be the
simpliest method.

Is it possible to enter a single value from an .xls file:
e.g.: ='C:\...\desktop\[test.xls]Sheet1'!A1 //output e.g. 22

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Importing a single cell from one .xls to another

On 30 May, 11:46, Mike H wrote:
Hi,

You could try *a couple of ways.
1. Copy the cell in your source workbook (Edit - Copy) then select the cell
in the recieving workbook and then
Edit|Paste Special|Paste Link

or

Try this small macro in the recieving workbook.

Sub getdata()
Workbooks.Open Filename:="c:\book2.xls" 'source book change to suit
myvalue = Sheets("sheet1").Range("A1").Value
ActiveWorkbook.Close savechanges:=False
ThisWorkbook.Worksheets("Sheet1").Range("B1").Valu e = myvalue
End Sub

Mike



"AMaleThing" wrote:
I'm hoping you can help me find a simple method to a problem.


I was importing a .xls file using the External Data tool into my
worksheet which worked find.


I now have a requirement to import data from reports generated each
day, so importing the whole of a sheet each day might not be the
simpliest method.


Is it possible to enter a single value from an .xls file:
e.g.: ='C:\...\desktop\[test.xls]Sheet1'!A1 * *//output e.g. 22- Hide quoted text -


- Show quoted text -


Thanks for the help. I went with the first suggestion as it was the
simplest, however I'll keep hold of your other suggest becuase I've a
feeling this is getting mor complicated that expected.

Thanks again!
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
From single cell variables to a single column serie noyau New Users to Excel 1 December 22nd 06 06:43 AM
Importing multiple forms into a single Excel list Jacques Excel Discussion (Misc queries) 0 November 3rd 06 06:51 PM
is there a way to add single digits within a single cell? ceci Excel Worksheet Functions 3 August 18th 05 08:58 PM
Importing multiple text files into single workbook Steve[_56_] Excel Programming 1 January 15th 04 08:18 PM
Importing Multiple lines of text in a single Excel Cel filmfatale Excel Programming 1 December 8th 03 08:33 PM


All times are GMT +1. The time now is 09:55 PM.

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"