Updating two cells linked in excel
Options in the VB Editor" width="427" height="368" /Sub Scale Axes() With Active Chart.
Value End With End Sub You can type all this into the code module, or you can copy it and paste it in. You can run the code by pressing Alt F8 to open the Macros dialog, selecting the procedure in the list of macros, and clicking Run.
The bar chart showed a large proportion of the bar representing 178, with a small section to show 37.
For example I have a stacked chart with two values; one is a target of 651,361 and one is an actual to date of 556,424.For example, last week, the figures for 'Allocated to A' were 37, the figures for 'Allocated to B' were 178.It is displayed as one bar with the separation split being quite obvious.There are a few pieces you need to make this technique work. Click on the left hand dropdown at the top of this module, and select Private Sub Worksheet_Change(By Val Target As Range) With Active Sheet.
You need a chart, a set of values for the scaling parameters, and some VBA code to change the axis scales.
I know both Pivot Tables and the Advanced Filter can do this, but both don't update dynamically.