+ Reply to Thread
Results 1 to 3 of 3

How can I quickly change the Series names in the legend?

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    77

    How can I quickly change the Series names in the legend?

    I have 24 series name "Series 1, Series 2, Series 3..." etc.

    I would prefer them to be named "Hour 1, Hour 2, Hour 3...". I have those labels in a column adjacent to the data, but I can only edit the Series names one at a time by clicking the "Select Data" button, and clicking Edit on each individual series name, then selecting a Range to rename it. I would prefer to select the entire range at one time to change them all. Is this possible>

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How can I quickly change the Series names in the legend?

    Usually you would just select both columns before you create the chart - make sure that the header above the labels is blank.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: How can I quickly change the Series names in the legend?

    My contribution to the discussion:
    I would prefer to select the entire range at one time to change them all. Is this possible>
    I am almost certain that what you want is entirely possible. I am not aware of a preprogrammed utility that will do this, so it will require developing the VBA ("macro") code for it.

    As romperstomper suggests, by far the easiest way is to make sure to include the "series name" in the series at chart creation.

    When this needs to be done after chart creation, then one needs to decide which is "harder" or more time consuming. My gut feel has always been (for my own VBA skill level anyway), that it is faster and easier (even if it is tedious), to manually change the series names one at a time (for only 24 data series) than it would be for me to code and debug a macro that would do it for me.

    If you judge that it is preferable to write the code, the heart of your code will be understanding how to set the .name property of the .series object
    https://msdn.microsoft.com/EN-US/lib.../ff838988.aspx shows how to access an individual series object. Then follow the link to "series object member" at the bottom to pull up the list of properties and methods (including the name property).

    The other main concept you will need is "looping". In this case, I think a For Each..Next loop would be most appropriate: https://msdn.microsoft.com/EN-US/lib.../gg264596.aspx

    Even though coding this would take much longer for a beginner to write, it should be a simple enough task that, if you were looking for an excuse to introduce yourself to VBA coding, this would be a relatively simple procedure to write and debug and would possibly make a good introduction to VBA coding. In the short term it would be a lot more effort than manually changing the names of each series. In the long term, it would be an opportunity to learn VBA which, in the future, may allow you to simplify much more complex repetitive tasks.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Replies: 2
    Last Post: 09-15-2015, 12:34 PM
  2. Quickly change multiple UserForm TextBox names
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2014, 08:51 AM
  3. BREAKING down a month series into a daily series, quickly
    By skooby in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-13-2014, 02:09 AM
  4. how to change the range names in a series of formulas.
    By sumesh56 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-01-2013, 09:08 PM
  5. How do you change the legend from series to an actual value?
    By jackofalltrades in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-04-2012, 02:47 AM
  6. [SOLVED] Hide series names for unused data from chart legend
    By Neil Goldwasser in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-10-2006, 03:15 PM
  7. [SOLVED] Quickly Changing Several Series to Appear the Same
    By Barb Reinhardt in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-07-2005, 12:06 PM

Tags for this Thread

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