Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Source for General V LookUp Tutorial?? | Excel Worksheet Functions | |||
Auto update chart source reference | Charts and Charting in Excel | |||
Reference Source Deleted & VBA ref adjustments | Excel Discussion (Misc queries) | |||
Using a relative SHEET reference for source data in a chart | Charts and Charting in Excel | |||
how do I format a cell reference to move as source changes | Excel Worksheet Functions |