+ Reply to Thread
Results 1 to 4 of 4

Create Chart VBA

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Create Chart VBA

    Hi All,

    I am creating a chart on userform from a table. It works perfectly when I select a range of data from two columns next to each other by using the following code:

    Please Login or Register  to view this content.
    But what I really want is to have a chart from data in column A and the last column. I have tried to be creative and used the following code but I am getting error message "Type Mismatched". any idea how can I define to select data of column A and the last Column?

    Please Login or Register  to view this content.
    PS. I have defined lc as last column so everything works fine with the first code but don't really know how to select only column A and the last Col.

    Thanks,

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Create Chart VBA

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    390

    Re: Create Chart VBA

    Thanks John. I tried this it gaves me an error but I added Set before rng=.... and worked perfectly.

    Thanks for your help.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Create Chart VBA

    Good catch. I overlooked that. You're welcome. Glad to help out and thanks for the feedback.

+ 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. Create a chart from pivot with a specific type of lay out for chart
    By excelas88 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-08-2015, 03:03 PM
  2. vba code to create chart and fix the axis of the chart
    By Sushil.thakur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2013, 06:14 AM
  3. Replies: 3
    Last Post: 04-07-2013, 07:40 AM
  4. [SOLVED] How to create Mosaic Chart or Marimekko chart using VBA
    By jonelamora in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-04-2012, 09:14 PM
  5. create a chart with variable Chart data
    By demuro1 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 10-06-2008, 08:54 AM
  6. [SOLVED] Chart data file lost - need to re-create from chart?
    By LostExcelData in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-07-2006, 03:00 PM
  7. [SOLVED] Create a combo chart with two of the same chart types
    By Mark Parent in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-13-2005, 09:05 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