Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default embed cell references in macros

I would like to create a macro that opens up a list of files in sequence and
copies data across for manipulation (could be as many as 100 spreadshhets to
open/copy/close. I would like the 'master' spreadsheet to contain a list of
filenames (plus path extensions) that the macro reads down opening in turn.
The user (third party) can then update the list of files as and when new
files are created. This requires being able to 'embed' cell related info into
the macro? This is a task you could do in Lotus but have not yet solved in
Excel.

Any help greatly appreciated
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default embed cell references in macros

Create a named range in excel. Input your file names/paths in there,
then have your code go through the named range. I would say that's the
easiest way.

If your question is how to read the value of a cell from excel into
vba, there are tons of ways. Here are two of the simpler:

1)x= thisworkbook.worksheets(1).cells(1,1).value
2) x = activesheet.range("A1").value



Pippa wrote:
I would like to create a macro that opens up a list of files in sequence and
copies data across for manipulation (could be as many as 100 spreadshhets to
open/copy/close. I would like the 'master' spreadsheet to contain a list of
filenames (plus path extensions) that the macro reads down opening in turn.
The user (third party) can then update the list of files as and when new
files are created. This requires being able to 'embed' cell related info into
the macro? This is a task you could do in Lotus but have not yet solved in
Excel.

Any help greatly appreciated


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default embed cell references in macros

Many thanks for this, I haven't tried it yet,but I do think it will work. The
second appears to be the more practicable in that the first would require the
third party user to potentially re-name the range periodically or
alternatively create a range in excess of the number of file paths required.

Thankyou

"John" wrote:

Create a named range in excel. Input your file names/paths in there,
then have your code go through the named range. I would say that's the
easiest way.

If your question is how to read the value of a cell from excel into
vba, there are tons of ways. Here are two of the simpler:

1)x= thisworkbook.worksheets(1).cells(1,1).value
2) x = activesheet.range("A1").value



Pippa wrote:
I would like to create a macro that opens up a list of files in sequence and
copies data across for manipulation (could be as many as 100 spreadshhets to
open/copy/close. I would like the 'master' spreadsheet to contain a list of
filenames (plus path extensions) that the macro reads down opening in turn.
The user (third party) can then update the list of files as and when new
files are created. This requires being able to 'embed' cell related info into
the macro? This is a task you could do in Lotus but have not yet solved in
Excel.

Any help greatly appreciated



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
cell references in macros Dave F Excel Discussion (Misc queries) 3 November 28th 06 05:19 PM
Relative (vs. Absolute) Cell References with macros Claude S. Weiller Excel Discussion (Misc queries) 1 August 3rd 06 08:56 PM
Cell references in macros Dan Excel Programming 2 May 30th 06 08:23 PM
Using cell references in Excel Macros Michelle Ann Excel Programming 1 August 18th 04 01:43 AM
Relative Cell References in Macros Barry Staples Excel Programming 4 January 25th 04 07:44 AM


All times are GMT +1. The time now is 12:21 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"