Graph: conditional X-axis values

Clariinc

New Member
Joined
Nov 8, 2014
Messages
1
Hi!

I have a set of non-static values that is setup based on certain value criteria:
Namevalue 1value 2
A--
B6%3%
C-10%8%
D--

<tbody>
</tbody>

Basically I have a database, but this table only shows the values of interest. In this case it is to display both columns of data if the number in 'Value 1' exceeds +/- 5%. So as long as the cell in 'Value 1' meets this criteria, the corresponding number in 'value 2' will also be displayed.

However, I would like to graph Name (x-axis) against Value 1 and 2 (Y-axis). And I have a problem because I don't want my x-axis to have the irrelevant data as labels too. In this case, I only need B & C in my x-axis.

But since its a non-static data, i.e. if the criteria was changed, it may be A, C & D that have the table populated while B is blank. Then my x-axis should only have A, C & D.

Is it possible to format my graph such that it is able to adjust the axis according to whether or not there is a corresponding value?

Thanks!!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi, welcome to the forum !

To get the desired graph where only the relevant values will be shown, create a supporting table and enter following array formula. You also need to create three named ranges for category, series one and and series two.

1. Create the supporting table using the array formulas I have shown below.
2. Create the graph and assign the Named Ranges in the Select Data dialog of the graph


Named Ranges:

Cat=OFFSET(Sheet1!$F$3,1,0,COUNT(Sheet1!$G$4:$G$7),1)
ValOne=OFFSET(Sheet1!$G$3,1,0,COUNT(Sheet1!$G$4:$G$7),1)
ValTwo=OFFSET(Sheet1!$H$3,1,0,COUNT(Sheet1!$G$4:$G$7),1)

<colgroup><col width="72" span="2" style="width:54pt"> </colgroup><tbody>
</tbody>



FGH
2Helper Table
3 value 1value 2
4B8%8%
5C9%9%
6#NUM!#NUM!#NUM!
7#NUM!#NUM!#NUM!

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:72px;"><col style="width:72px;"><col style="width:72px;"></colgroup><tbody>
</tbody>

Formeln der Tabelle
ZelleFormel
F4{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),1)}
G4{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),2)}
H4{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),3)}
F5{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),1)}
G5{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),2)}
H5{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),3)}
F6{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),1)}
G6{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),2)}
H6{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),3)}
F7{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),1)}
G7{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),2)}
H7{=INDEX($B$4:$D$7,SMALL(IF($D$4:$D$7<>"",ROW(D4:D7)-ROW(D4)+1,""),ROW(D4:D7)-ROW(D4)+1),3)}

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top