Consulting

Results 1 to 4 of 4

Thread: MAKE DISAPPEAR the reference in the graph!

  1. #1

    MAKE DISAPPEAR the reference in the graph!

    Hi guys !!!



    In a graph it's possible to make disappear the reference in the X if the value is 0 ?



    In the attach file you can see what i want!

    Thanks

  2. #2
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location
    Ricardo

    As far as I am aware once you define the x-axis you can not omit values of " 0 ".

    With that said, I would recommend filtering out the "0's" and then creating the chart(s).

    I have created some rough code to remove the values equal to "0".

    BEWARE!!! The code I wrote has a defined range as I assumed you only wanted to do this once. If you have more data that you need to filter out or you need to do this on a more frequent basis, the code will have to be re-written.

    If this does not sufice your needs, please give more details. Hope this helps.

    Phil

  3. #3
    Thanks Phil !!!

    I will try to look to the problem in a different way and them i will post another reply...

  4. #4
    VBAX Expert Shazam's Avatar
    Joined
    Sep 2005
    Posts
    530
    Location
    Try this!


    [VBA] Sub Hide_Zeros()
    Dim Rng As Range
    Dim c As Range
    ' Adjust the range to suit
    Set Rng = Range("C5:C18")

    For Each c In Rng
    ' Determine Criteria
    If c.Value = 0 Then
    ' OR If c.Value = 0 Then
    c.EntireRow.Hidden = True
    End If
    Next c

    End Sub

    [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •