PDA

View Full Version : dynamic chart in excel, size changes - desperate for help please!



mars1985
01-23-2013, 10:45 PM
Hi all,

I'll start by confessing that I'm a neuropsychologist, not a computer-savvy person at all, so I'm really sorry if my way of expressing things isn't helpful! But ... I'm absolutely desperate for some help with a chart in excel. It's for a new report format for hospital patients and this is basically the last step, and I would be very very grateful for any help! Ok ...

The kind of data I'm working with are patient test scores, but for each patient, I'll only be giving them some tests (e.g. usually 10-15) out of a posisble 120 or so. Therefore, I've created a stacked bar chart (long explanation, but it has to be stacked!) with dynamic ranges, so the chart reflects just the scores I need. That's all working fine, and I'm over the moon that just the data I want goes into the chart, and does it all automatically. However.... Sometimes I will only give a patient 4 tests, and other times 20 tests. When the data is entered, the size of the chart stays the same no matter how many scores are in it. This means the bars on my chart are either all squished up (e.g. if 20), or all spread out (e.g. if only 4).

Is there some way where the chart area will 1) always stay the same width (even though sometimes the labels are quite long), but varies in height depending on the number of variables in the chart? I was thinking there may be some VBA code (which I'm not very clued up about!) to do this? I've attached a picture which may help in demonstrating my problem. Thank you very very much in advance for any help!
Cheers,
Tamara