PC Review


Reply
Thread Tools Rate Thread

Copy data automatically from another workbook

 
 
CACustom
Guest
Posts: n/a
 
      4th Aug 2008
Invoices are saved as individual workbooks. Have a separate collections
workbook where user will enter the invoice number into cell in column B
(invoice number is same as filename of invoice, i.e. 08132R).
Need code to have invoice information automatically fill in across the row
where the invoice number was entered.

--
CA Custom Payroll
 
Reply With Quote
 
 
 
 
J Sedoff comRemove>
Guest
Posts: n/a
 
      4th Aug 2008
Check out the article here:
http://support.microsoft.com/kb/213933

It talks about the Indirect() function which allows you to use values within
a cell to create an address/file path. It should be right up your alley!

If you still have questions, I'd be glad to clarify and help.

Hope this helps, Jim
--
I appreciate any feedback.
 
Reply With Quote
 
CACustom
Guest
Posts: n/a
 
      4th Aug 2008
Thank you for your response, however the problem with INDIRECT is the source
files would all have to be open and remain open anytime the collection
spreadsheet is opened. There will be times when there are over 100 source
files being listed on the collection spreadsheet.
--
CA Custom Payroll


"J Sedoff" wrote:

> Check out the article here:
> http://support.microsoft.com/kb/213933
>
> It talks about the Indirect() function which allows you to use values within
> a cell to create an address/file path. It should be right up your alley!
>
> If you still have questions, I'd be glad to clarify and help.
>
> Hope this helps, Jim
> --
> I appreciate any feedback.

 
Reply With Quote
 
J Sedoff comRemove>
Guest
Posts: n/a
 
      4th Aug 2008
In that case, use VBA macros. Something in the vein of:

'Contains the path "='T:\certifcation\Skimming Trans\2008\Jul 08\8456318R"
for the month of July 2008
file_path = "='" & the_path & this_year & "\" & this_month & " " & _
Format(yesterday, "yy") & "\" & cells(1,2).value
cells(1,1).formula = "=" & file_path

For example you'd like something like the following in a particular cell,
"='DriveLetter:\Folder1\Folder2\[FileName.xls]SheetName (2)'!$K$12"
which gives
=C:\My Documents\Music\[My Cds.xls]Favorite Country'!$K$12

Obviously that won't get you all that you need, but do you at least get the
general idea?

If you use macros, the values will still update without needing to have
those files open, and it creates a direct link.

Hope this helps, Jim
--
I appreciate any feedback.
 
Reply With Quote
 
CACustom
Guest
Posts: n/a
 
      5th Aug 2008
Thank you. This put me in the right direction. I was able to get the macro to
do what I wanted it to using the input cell value as a variable in the code -
and used the offset function to enter the links into the related cells in the
row.
It's working! I will just need to tweak a few things to make it more user
friendly.
Thank you!

--
CA Custom Payroll


"J Sedoff" wrote:

> In that case, use VBA macros. Something in the vein of:
>
> 'Contains the path "='T:\certifcation\Skimming Trans\2008\Jul 08\8456318R"
> for the month of July 2008
> file_path = "='" & the_path & this_year & "\" & this_month & " " & _
> Format(yesterday, "yy") & "\" & cells(1,2).value
> cells(1,1).formula = "=" & file_path
>
> For example you'd like something like the following in a particular cell,
> "='DriveLetter:\Folder1\Folder2\[FileName.xls]SheetName (2)'!$K$12"
> which gives
> =C:\My Documents\Music\[My Cds.xls]Favorite Country'!$K$12
>
> Obviously that won't get you all that you need, but do you at least get the
> general idea?
>
> If you use macros, the values will still update without needing to have
> those files open, and it creates a direct link.
>
> Hope this helps, Jim
> --
> I appreciate any feedback.

 
Reply With Quote
 
J Sedoff comRemove>
Guest
Posts: n/a
 
      5th Aug 2008
Great! Thanks for the feedback! Glad to help, Jim
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically move cell data in 1 workbook to another workbook =?Utf-8?B?R2VuZXNpcw==?= Microsoft Excel Worksheet Functions 1 5th Nov 2006 07:35 PM
How do I automatically copy data from one workbook to another? =?Utf-8?B?dXJndXk=?= Microsoft Excel Worksheet Functions 1 22nd Sep 2006 03:50 PM
1.Open workbook. 2 copy data. 3 replace data. 4 save workbook. Cristobalitotom Microsoft Excel Programming 0 6th Jul 2006 12:24 AM
Copy A Workbook Automatically =?Utf-8?B?TGVu?= Microsoft Excel Programming 1 16th May 2006 09:55 AM
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Microsoft Excel Programming 1 1st Apr 2006 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 AM.