ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying values from one file to another (https://www.excelbanter.com/excel-programming/341114-copying-values-one-file-another.html)

titushanke[_4_]

Copying values from one file to another
 

Hi all,

I am in desparate need of a macro that automatically copies the value
from one file to another. Sounds simple?

Well, not quite.. Let me give you an example..

I have 2 files:
- MASTER FILE
- OLD VALUES FILE

My Master file contains some cells in which numbers are manuall
inserted, let us say, C2:C200. The cells are currently blank.

The OLD VALUES file contains the same cells, also with numbers manuall
input (and actually contains numbers).

Instead of simply linking the files to each other, I would like a macr
that copies all numbers from one file to the other (paste special
values).

The user should be prompted to locate the file to copy from (OLD VALUE
FILE), as this might be located somewhere in another folder.

Think of this whole thing as an update procedure. My master fil
sometimes changes, but I don't want to manuylly Re-Input all th
figures from the old file to the new file. Therefore I would need thi
routine to manually copy all values in a certain range from one fil
another, with the user being promted to locate this file.

Does anybody have a clue how I can do this? Especially the prompting o
the user to locate the file...


Thanks in advance for your help!!!!

Ciao, Titus

--
titushank
-----------------------------------------------------------------------
titushanke's Profile: http://www.excelforum.com/member.php...fo&userid=1999
View this thread: http://www.excelforum.com/showthread.php?threadid=47076


Tom Ogilvy

Copying values from one file to another
 
Look at the filesearch object.

--
Regards,
Tom Ogilvy

"titushanke" wrote
in message ...

Hi all,

I am in desparate need of a macro that automatically copies the values
from one file to another. Sounds simple?

Well, not quite.. Let me give you an example..

I have 2 files:
- MASTER FILE
- OLD VALUES FILE

My Master file contains some cells in which numbers are manually
inserted, let us say, C2:C200. The cells are currently blank.

The OLD VALUES file contains the same cells, also with numbers manually
input (and actually contains numbers).

Instead of simply linking the files to each other, I would like a macro
that copies all numbers from one file to the other (paste special -
values).

The user should be prompted to locate the file to copy from (OLD VALUES
FILE), as this might be located somewhere in another folder.

Think of this whole thing as an update procedure. My master file
sometimes changes, but I don't want to manuylly Re-Input all the
figures from the old file to the new file. Therefore I would need this
routine to manually copy all values in a certain range from one file
another, with the user being promted to locate this file.

Does anybody have a clue how I can do this? Especially the prompting of
the user to locate the file...


Thanks in advance for your help!!!!

Ciao, Titus.


--
titushanke
------------------------------------------------------------------------
titushanke's Profile:

http://www.excelforum.com/member.php...o&userid=19997
View this thread: http://www.excelforum.com/showthread...hreadid=470761





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com