excel - Using VBA to name ranges and create charts with those ranges -


I'm new to VBA I am trying to create more than 500 exclambered column charts using two columns of information And I want to speed up the work. The first column contains the names that I want to use for named ranges (i.e.: line1 , line2 , etc.) and the second column contains indirect references to the data range There are I (i.e., sheet 1! C4: D28 , sheet 1! C28: D90 ). I have noticed that if I use a named range for the "Chart Data Series" field, then the data appears well (but I have already mentioned that named category in reference to INDIRECT Formula to be included), (eg: named range line1 = = INDIRECT (sheet 1! C4: C28) ). Categories will be stable

In the review earlier, I am unable to find this solution which can choose the first cell in this set and keep its name, then uses another cell to define that category. I think I might need the ActiveWorkbook.Names.Addname Name: = Combine the formula and it with a loop (but I want to define the add name aspect as a selection or cell Could not use, only one hard Not coded event name).

If the solution requires this, I can return different categories (i.e.: C4: D28 ) from the cell and can reference the chart only if this code is simplified gives. I know that my first underlined effort is not the only solution and possibly a silent H and using more elegant named categories, I have to speed up the work of the chart, but perhaps there is a way to eliminate that step?

For each of these categories, a new sheet with all the charts will have to be cut on the cake,

NameRange1 (We say in cells A1: A4)

  • WKD_1_NB
  • WKD_2_EB
  • WKD_3_EB
    SerRange1 (in cells B1: B4)
  • WKDpivot! C4: D43
  • WKDpivot! C84: D140
  • WKDpivot! C197: D233

    (For charts data category, reference to the named category "WKD_1_NB" is required '' = Indirect (WKDpivot! C4): D43) 'for charts to work .

  • OK, so why do not you try a bi-step process? I'm going to do this without indirect because I do not think it's necessary. Range = Range ("A1: A2") set in the form of string Dim adrer string as MyName range as Dim Rng As Range Dim Range as the (CreateNames) ) '# # Modify according to requirement RNG in every R. Seals myName = r.Value addr = "=" & amp; R. Offset (0, 1). Value Workbook Name. Add myName, addr Next End Sub

    This creates your name (screenshot) Note that there are some rules about the names of the conventions and the acceptable name etc., the above mentioned code in the account None of the takes.

    Enter image details here

    To create a loop from there It should be quite simple that connects your chart one by one, and specifies each named range in each chart.


    Comments

    Popular posts from this blog

    import - Python ImportError: No module named wmi -

    Editing Python Class in Shell and SQLAlchemy -

    c# - MySQL Parameterized Select Query joining tables issue -