Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Importing a single cell from one .xls to another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AMaleThing - 30 May 2008 11:07 GMT
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
Mike H - 30 May 2008 11:46 GMT
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").Value = myvalue
End Sub

Mike

> I'm hoping you can help me find a simple method to a problem.
>
[quoted text clipped - 7 lines]
> Is it possible to enter a single value from an .xls file:
> e.g.: ='C:\...\desktop\[test.xls]Sheet1'!A1    //output e.g. 22
AMaleThing - 30 May 2008 13:24 GMT
> Hi,
>
[quoted text clipped - 29 lines]
>
> - 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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.