+ Reply to Thread
Results 1 to 4 of 4

dont show horizontal category names if values is zero

  1. #1
    Registered User
    Join Date
    09-03-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    18

    dont show horizontal category names if values is zero

    HI

    In the chart, horizontal category names should not appear in the chart if those values are zero. According to sample data (attached file), there should be appear 5 names only in the horizontal category axis.

    Any help is greatly appreciated & please find attachment.

    Thank-You very much

    Regards
    Raj Kumar
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: dont show horizontal category names if values is zero

    Hi,

    Put a formula in B3:

    =IF(B2="","",B1)

    and copy to P3.

    Then edit the chart so that the horizontal axis references B3:P3.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    09-03-2020
    Location
    INDIA
    MS-Off Ver
    2013
    Posts
    18

    Re: dont show horizontal category names if values is zero

    Thank you XOR LX,

    I applied the method what you suggest. But in the chart , there is much gap between names. How to reduce that Gap. Please suggest me.
    Attached Images Attached Images

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: dont show horizontal category names if values is zero

    Formula in B3:

    =IFERROR(INDEX($B$1:$P$2,ROWS(B$1:B1),AGGREGATE(15,6,(COLUMN($B$1:$P$2)-MIN(COLUMN($B$1:$P$2))+1)/($B$2:$P$2<>""),COLUMNS($B1:B1))),"")

    and copied down one row and across to P4.

    In Name Manager, define:

    Name: ChartAxis
    Refers to: =Sheet1!$B$3:INDEX(Sheet1!$B$3:$P$3,MATCH(99^99,Sheet1!$B$4:$P$4))

    Name: ChartValues
    Refers to: =Sheet1!$B$4:INDEX(Sheet1!$B$4:$P$4,MATCH(99^99,Sheet1!$B$4:$P$4))

    In the chart, change the series values to:

    =Sheet1!ChartValues

    And change the horizontal axis labels to:

    =Sheet1!ChartAxis

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Last number match dont show all values
    By tijdjes123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2018, 10:52 AM
  2. Replies: 2
    Last Post: 10-19-2015, 02:59 AM
  3. Replies: 1
    Last Post: 04-03-2014, 04:22 PM
  4. horizontal category axis label
    By ammartino44 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-11-2014, 01:25 PM
  5. [SOLVED] VBA to show Horizontal Category axes in Charts
    By caabdul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2014, 02:10 PM
  6. Replies: 9
    Last Post: 04-27-2011, 09:12 PM
  7. Hiding Category Names For Zero Values
    By TPARK in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-28-2007, 05:03 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1