Changing cell ranges in all series of a graph

Solved/Closed
Report
-
 Kenneth Just -
Hello,

I have a graph with 5 series on it.

='Entire series of data'!$E$17,'Entire series of data'!$E$5066:$E$6375,'Entire series of data'!$I$17,'Entire series of data'!$I$5066:$I$6375,'Entire series of data'!$P$17,'Entire series of data'!$P$5066:$P$6375,'Entire series of data'!$W$17,'Entire series of data'!$W$5066:$W$6375,'Entire series of data'!$AD$17,'Entire series of data'!$AD$5066:$AD$6375,'Entire series of data'!$AK$17,'Entire series of data'!$AK$5066:$AK$6375

I want to change my cell range from 5066:6375 to someother value, say 1:1000, can I do this without manually selecting each series and then clicking edit and then changing them.

Thank you.

Sasi

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I have never done it, but just wondering if a named ranged would work. just a thought
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768 > Sasi
1.for dont need all graphs, replace these seven lines of code
    Do While Sheets("Chart_Setup").Cells(graphInfoRow, "A") <> ""
        
        With Sheets("Chart_Setup")
        
            chartname = .Cells(graphInfoRow, "A")
            labelInfo = .Cells(graphInfoRow, "B")
            dataStartRow = .Cells(graphInfoRow, "C")
            dataEndRow = .Cells(graphInfoRow, "D")
        
        End With


WITH

    myCharts = Array("Flex curve_Last cycle (V)", "Flex curve_Last cycle (IV)")

    Do While graphInfoRow < 4
        
            chartname = myCharts(graphInfoRow - 2)
            labelInfo = 17
            dataStartRow = Sheets(dataSheet).Range("A7")
            dataEndRow = Sheets(dataSheet).Range("C7")


NOTE: You said row information can be found in A8 and C8. I did not find there. I found in A7 and C7 and the code reflects that. Make the changes if I have it wrong.

2. For the second part, create a brand new workbook with nothing on it. Paste the macro and save the file as "addin". For that when you save the file, from the drop down of file type choose "xla" if your are using older excel or xlam if using excel 2007. So next time when ever you open excel, this macro would be available to u
>
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

Thank you Riz, it does work. I guess the problem is solved. But I had one more question,
In the code where we have this,

Select Case chartname

Case "Flex curve_Entire test (V)"
Case "Flex curve_Entire test (IV)"
Case "Shaft vs. Optotrak angle"

do we still need them? I mean since I am not touching them at all, leaving them there would not cause unseen problems in the future, right?

Thanks.

Sasi
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768 > Sasi
No, they will never be true and hence never will get executed. It was easier to tell you what lines to change, if i left it. So that is why they are there. You can take it out or leave it, up to your mood
>
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

Thank you very much Riz. I am sure my problem has been solved. In case I need any help in due course of my project I shall seek your advise again. Thank you once again.
Thank you very much. My problem was already solved about thus posting. Hope you will be post more. To make it easier the work.

<a href="http://www.ulfwood.net/RenameFiles/FileRenamer.aspx">File Renamer</a>