Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default General reference source

I need a macro code for a general sheet reference to a single column. In my
excel file I have about 15 sheets. In every sheet I would like to make a
graph of the same colum (F column). It should be possible to put this in a
macro, but I don't see how I can refer in my macro to the F column in a
general way for all the sheets instead of referring to a single specific
sheet. Now I have:
="=sheet2!R1C6:R108C6
This is specific (sheet2) and not general. So I think I should change
'sheet2!' in a general definition. Then the macro will use this source for
making a graph on all my 15 sheets. Thanks for helping me!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default General reference source

I'm not quite sure what you're doing, but you may be able to use:

Dim myRng as range
dim wks as worksheet
for each wks in thisworkbook.worksheets
set myrng = .range("F1",.cells(.rows.count,"F").end(xlup))
your code here to create the chart for each sheet???
... = myrng.address(external:=true), ...

Ruben wrote:

I need a macro code for a general sheet reference to a single column. In my
excel file I have about 15 sheets. In every sheet I would like to make a
graph of the same colum (F column). It should be possible to put this in a
macro, but I don't see how I can refer in my macro to the F column in a
general way for all the sheets instead of referring to a single specific
sheet. Now I have:
="=sheet2!R1C6:R108C6
This is specific (sheet2) and not general. So I think I should change
'sheet2!' in a general definition. Then the macro will use this source for
making a graph on all my 15 sheets. Thanks for helping me!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default General reference source

Thank you very much for your reaction!

Ruben


"Dave Peterson" wrote:

I'm not quite sure what you're doing, but you may be able to use:

Dim myRng as range
dim wks as worksheet
for each wks in thisworkbook.worksheets
set myrng = .range("F1",.cells(.rows.count,"F").end(xlup))
your code here to create the chart for each sheet???
... = myrng.address(external:=true), ...

Ruben wrote:

I need a macro code for a general sheet reference to a single column. In my
excel file I have about 15 sheets. In every sheet I would like to make a
graph of the same colum (F column). It should be possible to put this in a
macro, but I don't see how I can refer in my macro to the F column in a
general way for all the sheets instead of referring to a single specific
sheet. Now I have:
="=sheet2!R1C6:R108C6
This is specific (sheet2) and not general. So I think I should change
'sheet2!' in a general definition. Then the macro will use this source for
making a graph on all my 15 sheets. Thanks for helping me!


--

Dave Peterson

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
Source for General V LookUp Tutorial?? ConfusedNHouston Excel Worksheet Functions 3 June 6th 08 01:50 AM
Auto update chart source reference HankW Charts and Charting in Excel 2 January 15th 07 06:16 AM
Reference Source Deleted & VBA ref adjustments unexpected Excel Discussion (Misc queries) 6 December 7th 06 09:09 PM
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 06:07 PM
how do I format a cell reference to move as source changes KGray Excel Worksheet Functions 1 August 13th 05 01:41 AM


All times are GMT +1. The time now is 05:29 AM.

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"