A new question related to a solved problem . I am getting the error message for trying to plot greater than 32,000 points on a 2D graph.
Doing a little searching on the forum and elsewhere, it seems that this is caused by actually trying to graph that much data (then you'd need to use multiple series) or using cells that may be empty but have a space in them (thereby making excel think there is really data to be plotted, such as if you select a whole column). But the data set being graphed (as shown in the link to the previous thread) selects a data set that is typically only 5-20 data pairs long.
The error can be simply acknowledged and then everything works fine, I am thinking the way I "clear" the data sheet may be to blame. If my method of clearing the data is:
I was wondering if that would that cause the cells to contain a space even though there is no space between the "" so I changed it toSheets("PLOT DATA").Activate Range("A2:O200") = ""Didn't help. Any thoughts? I can find the reason why the message appears but the only solution I have found that has worked for others is to use more series to plot the data-thing is I don't have that much data being plotted, but somehow the program is reading that I do.Sheets("PLOT DATA").Activate Range("A2:O200") = "" Sheets("PLOT DATA").Select Columns("A:O").Select Selection.delete Shift:=xlToLeft
Last edited by AKL01; 10-07-2011 at 03:55 PM.
Be easier to solve with a workbook. However, to clear the data:
will do.Sheets("PLOT DATA").Range("A2:O200").ClearContents
I wish I could upload a workbook, I get the error that is attached. I've sent a question through the forum help, but I have not heard anything. I can upload pictures though.
I did try the suggested code, still get the error message though. The main workbook has 10 sheets; 9 of the sheets show a 'normal' amount of rows (about 130) unless you keep scrolling down. The plot data tab is the only one that always shows ALL 1048576 rows all of the time. That was my other thought on what might be causing the problem. But I don't know how to reduce the number of rows carried on that sheet. I think that the number of rows is also causing the workbook to be 13.3 MB when the original was 75 KB before some data sorting and plotting. The part I don't understand is if the selected data is small and the graph only shows the data intended, why the message shows there are >32,000 being used somewhere in this process.
Any idea on how I can fix the ability to upload a workbook?
A coworker helped me find the error point on this one.
The file size was being caused when the macro highlighted and copied 3 columns from one sheet and pasted them to another sheet-that's when the 1 million+ rows appear. I hardwired in a range that I know will cover my data for now during the copy. Later on I;ll fix it to use whatever the data range really is, similar to my original plotting question.
The plotting error is related to the same location. The last step in the copying subroutine leaves those three columns highlighted. There are several more Subs called that do work on the sheets before the plotting macro. However, in the plot macro, the plot is created THEN the correct range for the plot established (the correct range solves the problem, which is why the overall result was good, there was just the annoying error to deal with). Problem is, when the plot is created, it has the 3 columns of 1E6+ rows of data, causing the error.
So, in the beginning of the plot macro, I have it select a single cell before creating the plot, then the correct range is input.
Two different problems, same cause.
Forgot to mention, fixing the problem also reduced the file size from 13.3 MB to about 400KB. And the macro runs in about half the time.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks