+ Reply to Thread
Results 1 to 4 of 4

Thread: Removing Empty Series from Legend

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    5,372

    Removing Empty Series from Legend

    This is a new problem with this workbook

    http://www.excelforum.com/excel-char...of-series.html

    How can I keep the legend from displaying symbols for all those blank series for the x/y scatter (short of deleting them 1 by 1)? I'm open to VBA solutions.

    I'm working in Excel 2007. This will be a protected spreadsheet with unprotected data cells. Users will be adding new lines of data which would constitute a new series.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by ChemistB; 09-18-2009 at 09:50 AM.
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Removing Empty Series from Legend

    You need to hide the unused rows to remove the series from the chart/legend.

    Your VBA code could control the hidden state of the rows in the table.
    Leave the file row in the table empty and reveal the next when new lot item is added in column A. You would need worksheet event code for this.


    right sheet tab and View Code.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
        If Not Intersect(Range("A6:A203"), Target) Is Nothing Then
            If Len(Target.Value) > 0 Then
                If Target.Offset(1, 0).EntireRow.Hidden Then
                    Target.Offset(1, 0).EntireRow.Hidden = False
                    Target.Offset(1, 0).Activate
                End If
            End If
        End If
        
    End Sub
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    5,372

    Re: Removing Empty Series from Legend

    Works perfectly Andy! Just what I was looking for. Thanks!
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  4. #4
    Registered User
    Join Date
    07-26-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Removing symbols from a spreadsheet

    How do i remove the  symbol from a spread sheet?

+ 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.2.0