Thread: Overlay charts
View Single Post
  #7   Report Post  
Ian
 
Posts: n/a
Default

Hi Jon,

Great advice, thanks. The screen flashing has gone. As far as the listbox
issue goes, I hadn't thought about building a userform but will follow the
links you suggest and decide which way to go.

Thanks again for all your help.

Ian.


"Jon Peltier" wrote:

Hi Ian -

To prevent the screen flashing, use this approach:

Application.ScreenUpdating = False
' your code goes here
Application.ScreenUpdating = True

In addition to this, you can smooth things out by replacing

Object.Select
Selection.Method

with this

Object.Method

The selection of objects is almost always unnecessary, and it takes time and causes
the screen to need frequent redrawing.

Do you want an in-sheet listbox, or are you building a userform? These use different
types of list boxes. You could make use of my favorite resource, and enter "excel
worksheet listbox" into an advanced Google search.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Ian wrote:
Thanks Jon,

You're right it is easy when you know how. The comparitive chemical data is
being held in a separate Excel workbook (Library.xls) and I managed to create
a macro to pull that data in and add it as a second series to the original
chart as you suggest. It does run a little "rough" in that you can see stuff
flashing by in the background. Can this be improred upon?

Also as I expand the library of comparative data it would be nice to have a
drop-down box that offers all the possibilities in the library, maybe as a
list of the macros produced to pull in the different chemical data. Can you
point me to some help for setting up such a drop down box (combobox or list)
as the Excel help files have not really explained too much.

Thanks again,
Ian.


"Jon Peltier" wrote:


Ian -

This is even easier (when you know how)! It's a simple two series
scatter chart. Start with the XY Scatter chart of the new data. Open the
workbook with the comparison data. Select and copy the X and Y data,
then select the chart, and use Paste Special from the Edit menu to add
the data as a new series.

Alternatively, with the second workbook open, select the chart, go to
Source Data on the Chart menu, select the Series tab, click Add, and
navigate to the other workbook and select the X and Y. The Windows menu
works with this dialog open to allow you to switch windows.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Ian wrote:


Jon,

Thanks for your reply, I'm a little confused now as to what I need. What I'm
doing is this, I sample chemicals in a spectrophotometer and the data
(Absorbance against Wavelength) are recorded in Excel. I then produce a graph
of this data. I then want to be able to overlay a separate graph of a
different chemicals' "signature trace" on top of this so I can get a visual
display of the two chemicals. The axes would be the same in both cases. Do
you think this is an Overlay or Combination chart? Thanks for your comments.

Ian.

"Jon Peltier" wrote:



Ian -

Do you mean you want to make a combination chart? The built in
combination charts are not all-inclusive, but Excel allows you to
construct your own combinations.

Make a chart with all series of the same type, then change some series
by selecting each in turn and choosing Chart Type from the Chart menu.

Overlaying charts is a complicated process and usually unnecessary.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Ian wrote:



I am looking to produce overlay charts and would like
confirmation of my own understanding of this topic.
Previous posts have yielded some very helpful results
(thanks Jon Peltier). Am I right in thinking that to
produce overlay charts it is something that I have to code
into the chart rather than it being a standard Excel menu
option? From the previous replies I have got example code
and I can handle that but I just wanted to make sure that
was the way to go??

Thanks for your comments,
Ian