+ Reply to Thread
Results 1 to 3 of 3

Programmatically creating a STACKED bar chart WITHOUT referring to a data RANGE of cells?

  1. #1
    Registered User
    Join Date
    07-05-2017
    Location
    Copenhagen
    MS-Off Ver
    2013
    Posts
    9

    Programmatically creating a STACKED bar chart WITHOUT referring to a data RANGE of cells?

    Fellow sufferers!

    I am new to this forum, here is my first problem:

    How do I make a Stacked Column Chart with VBA, without referring to a range of cells ? I have all the values as an array in my code.

    So far, this code makes a bar chart without referring to a data range - I did not find a way to change it to a stacked bar chart.

    Please Login or Register  to view this content.
    This code makes indeed a stacked bar shart - but it relies on a data range - I did not find a way to hand it an array instead:

    Please Login or Register  to view this content.
    Your input is highly appreciated!!

    BW Peter Bunde Hansen

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Programmatically creating a STACKED bar chart WITHOUT referring to a data RANGE of cel

    Hi and welcome to the forum.

    Have you tried creating a range name for your data? i.e. the F$:H7 range (call it say "myrange") - and preferably a dynamic range name that will adjust if the data range changes. Then use

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Programmatically creating a STACKED bar chart WITHOUT referring to a data RANGE of cel

    I think the user is looking for a method to directly handover the array to the chart instead of a range.

    This is what can be done -

    Please Login or Register  to view this content.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

+ 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. Stacked Column Chart with VBA - without referring to data range
    By PeterBundeHansen in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-05-2017, 04:16 AM
  2. Creating a Stacked Column Chart That Displays Monthly Data
    By Bounty Picker in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-22-2017, 08:57 AM
  3. Excel VBA : Chart : How do you determine, programmatically the chart range
    By TMS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2016, 09:50 AM
  4. Replies: 1
    Last Post: 05-30-2013, 10:03 AM
  5. Creating a Clustered Stacked Bar Chart
    By henryjarend in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-19-2012, 10:01 PM
  6. Linking dynamically allocated row offset to stacked column chart data range variable
    By amanagarwal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2011, 02:25 PM
  7. creating a named range and referring to its cells
    By twd000 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-02-2008, 12:25 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