Copy/Paste Chart with Specific Data Range

Solved
seblg29 -  
ccm81 Posted messages 11033 Status Member -
Hello,

I created a chart in Excel (columns C to F),
The data range is located from column C to F.

I need to reproduce this chart X times; however, only the data range should be modified.
When I copy columns C to F (including the chart) and paste them into columns G to J, the chart is duplicated, but the selected data range remains columns C to F, whereas I would like it to select the data located in columns G to J.
I couldn't find a way in Excel to achieve this...

However, under VBA, after a few attempts, it seems quite complex...

Do you have a solution to my problem?

Thank you in advance for your response,

Best regards,
Sébastien

4 answers

  1. tontong Posted messages 2575 Registration date   Status Member Last intervention   1 064
     
    Hello,
    A simple solution outside of VBA:
    Copy/paste the chart alone, you'll get a chart 2.
    Select chart 2 >>> the common data area will be highlighted in blue.
    Grab this frame with the mouse and move it to the desired data zone 2.

    A bit of practice or skill is needed, after that it will go smoothly!
    0
    1. seblg29
       
      Hello,

      However, I have to create this chart a hundred times, which is why I didn't want to select the data range each time.
      If you have any other ideas, I’m all ears.
      Best regards,
      0
  2. ccm81 Posted messages 11033 Status Member 2 434
     
    Hello tontong, it's been a while!

    For seblg29
    If you're into VBA, a little example
    https://www.cjoint.com/c/IDin47s1ptB

    Best regards
    0
    1. seblg29
       
      cool !!
      It seems that this is what I am looking for!
      Thank you, I will take a closer look at this!
      Best regards,
      0
  3. ccm81 Posted messages 11033 Status Member 2 434
     
    I have to make this graph a hundred times
    If you had said it earlier!
    To copy all the graphs at once
    https://www.cjoint.com/c/IDjhVtvghsB

    Best regards
    0
    1. seblg29
       
      Cool, it’s great like that!
      Thanks again!
      0
  4. ccm81 Posted messages 11033 Status Member 2 434
     
    You're welcome

    If it's done, can you mark the topic as resolved (in the top right, the gear icon)

    Have a nice afternoon
    0