+ Reply to Thread
Results 1 to 9 of 9

hide the bar spaces in the chart if thre is a no value in the selected range

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    23

    hide the bar spaces in the chart if thre is a no value in the selected range

    i have attached a excel which has a chart inserted by selecting the range which has values as well as null, is there a way we can hide the space utilised by Sep, nov, dec as there is no value for these month. Also i have tried with hiding the cell which does't have values, it is working fine, is there any other simplest way...?
    Testdata.xlsx

    Thanks,
    Uday kumar

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Hi, You can achieve this by creating named range.

    Press Ctrl+F3 and add a new name ChrRange. In the refer to tab, type this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in the select data for chart, use =Sheet1!ChrRange.

    Hope this helps

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Hi Uday,

    Two options...
    1) you should hide the rows which do not have any data
    You are getting month's name from below data range.. and you can hide rows 14,15,16,17

    ='P:\Excel macros\My Idea\[End to End Macro template.xlsm]Main Sheet'!$A$6:$A$17

    2) you can use defined name with dynamic data range.. which will keep on increasing / decreasing as per data available in data 1,2,3,4

    thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    08-16-2012
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Can you please elaberate the second option please.

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    This is working fine for me, but the problem here is each time i should go to select range and update this formula ro refresh the data, is there a way to auto refresh each time when the data is modified.


    Thanks,
    Uday Kumar

  6. #6
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Ya because of the indirect, it is happening so.

    You can try this one. It works fine.
    Create a named range ChrLabel =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$B$2:$B$13),1)
    ChrA =offset(ChrLabel,0,1)
    ChrB =offset(ChrLabel,0,2)
    ChrC =offset(ChrLabel,0,3)
    ChrD =offset(ChrLabel,0,4)

    Do not select any of the data. Insert Chart. Add a new series =Sheet1!ChrA. Similarly add the other series
    Edit the horizontal axis part(Label) =Sheet1!ChrLabel

    This will automatically refresh the data. You need not re-enter the range.

  7. #7
    Registered User
    Join Date
    08-16-2012
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Excellent!!! its working fine.......

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    Thx Sindhus.. for explaining the second option on my behalf

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: hide the bar spaces in the chart if thre is a no value in the selected range

    @ Shanthuday

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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