PDA

View Full Version : S: Graph Whole Row but automatically omit columns with no data and do not graph these



banker
08-28-2008, 12:19 AM
Hi all,
I know this may seem obvious but I need to graph the following:


labour
flights
paper
xx
aa
pp
Total


14
0


40

40

62

40


If I do an ordinary graph, on the X axis there would be "Flights" but there would be NO bar for this.

I want to graph only the columns with an entry greater than 0. If there is no amount in the column, I want the graph to completely ignore that column and Not even Graph that column.

So in the above case, the X axis should only graph: labour, paper, xx, aa and pp and completely ignore flights.

Any solutions for this problem?

Thank you heaps for all your expertise..

banker
08-28-2008, 12:28 AM
My table didnt come out right, so I hope this works.. thank you




labour
flights
paper
xx
aa
pp
Total


14
0


40

40

62

40

banker
08-28-2008, 12:30 AM
ill try again.. this is my table.. i didnt copy and paste a table from excel this time... here is goes again... Thank you

Labour Flights Paper XX AA PP
14 0 40 20 33 58

Aussiebear
08-28-2008, 02:47 PM
Hi Banker, Can you post an example workbook? Click on 'Go Advanced' then use 'manage attachments'. This way we'll get to have a look at your issue with a great deal more clarity.

banker
08-28-2008, 09:06 PM
Hi all, as requested, I have attached the spread sheet with instructions as to what I need. please help..

Many thanks

Mavyak
08-28-2008, 09:24 PM
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Me.Range("A15") Then
For x = 1 To 6
Target.Offset(0, x).EntireColumn.Hidden = False
Next x
For x = 6 To 1 Step -1
If Target.Offset(0, x) = 0 Then
Target.Offset(0, x).EntireColumn.Hidden = True
End If
Next x
End If
End Sub