+ Reply to Thread
Results 1 to 2 of 2

VBA- Copy cells incl. Diagram and update diagram reference

  1. #1
    Registered User
    Join Date
    12-20-2018
    Location
    Austria
    MS-Off Ver
    2010
    Posts
    1

    VBA- Copy cells incl. Diagram and update diagram reference

    Good Morning,

    I would like to automate an Excel file for my work, because the work steps repeat very often and it can easily lead to errors with several users.

    I would like to first copy the area A1: R55 and paste below.
    Ideally with 1 line spacing. This should be constantly expanded as new projects are added.
    All my formulas and conditional formatting will be applied.
    The reference of the diagram is unfortunately not taken over, it refers to the previously copied table.
    And this is exactly my problem, because it is very difficult in many projects to change the reference always.

    The table should be constantly updated, that is, the cells are copied continuously lower as new projects are added.

    Unfortunately, I do not really know the macros and can not go on like this.

    Now my question:
    With the help of a colleague, I have already created a reasonably working macro. With the macro it is possible to copy and paste the desired area.
    What I have not been able to do is to label the horizontal axis (very important as it has a formula related to the particular project) and to update the legend caption.
    What would be great, would be to group the lines from 1 to 36 automatically. (of course referring to the newly inserted project)

    Ideally, the whole thing should be possible with a button at the end of the sheet, which moves with down instead of a keyboard shortcut.

    It would be a huge help if someone could help me here!
    The Excel file including macro is attached.

    Kind regards
    Julian
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA- Copy cells incl. Diagram and update diagram reference

    Quote Originally Posted by Julian91 View Post
    ... With the help of a colleague, I have already created a reasonably working macro ...
    ... the "collective" proved itself

    Quote Originally Posted by Julian91 View Post
    ... What I have not been able to do is to label the horizontal axis ...
    e.g.:
    Please Login or Register  to view this content.
    Quote Originally Posted by Julian91 View Post
    ... to group the lines from 1 to 36 automatically. (of course referring to the newly inserted project)...
    e.g.:
    Please Login or Register  to view this content.
    , where corfact is e.g.: Const corfact As Byte = 36

    Quote Originally Posted by Julian91 View Post
    ... Ideally ... with a button at the end of the sheet, which moves with down instead of a keyboard shortcut ...
    First, e.g., add a button in cell "I45":
    Please Login or Register  to view this content.
    Second, corresponding changes in the main code, e.g. (invented "on the flight"):
    Please Login or Register  to view this content.
    In conclusion, it could look like this (interesting ... was that what it was about ?):
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sun ray diagram
    By maolse in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-13-2018, 07:18 AM
  2. [SOLVED] Excel Diagram: bubble diagram with dynamic quadrants
    By meiselsan in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 04-27-2015, 08:26 AM
  3. problem in line diagram- Messy line diagram
    By meus in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-16-2014, 12:50 AM
  4. Name only one bar in a diagram
    By LittleV in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-14-2008, 12:35 PM
  5. Diagram doesn't update automatically?
    By Kribulin in forum Excel General
    Replies: 5
    Last Post: 06-05-2008, 05:47 AM
  6. How to do a diagram
    By bob_hund in forum Excel General
    Replies: 10
    Last Post: 05-07-2008, 04:01 AM
  7. Diagram
    By roffe in forum Excel General
    Replies: 1
    Last Post: 05-13-2006, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1