How to set range for dynamic plot? RRS feed

  • Question

  • I need to write a vba code in excel that will plot a range of values, but the range is a variable.  I have three columns, the first is x, and the other two are y, and I need to plot x vs. y for the entire range.  The range is dependent on a counter variable.  


    Tuesday, July 15, 2014 7:40 PM


  • Re:  something about changing a range reference

    Maybe/maybe not...
    If you know the number of rows (R) and columns (C) in the 'new' range, you can resize the 'old' range ...
      Set rngData = rngData.Resize(R, C)

    Jim Cone
    Portland, Oregon
    free and commercial excel programs (n/a xl2013) (Dropbox)

    Wednesday, July 16, 2014 4:54 AM