+ Reply to Thread
Results 1 to 8 of 8

Chart Axis Label according to 2 cell values

  1. #1
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2024
    Posts
    347

    Chart Axis Label according to 2 cell values

    My horizontal axis label is currently ='S-CURVES LVL1'!$F$9:$BG$9

    I want the $F$9 & $BG$9 to refer to another cell

    something like this

    ='S-CURVES LVL1'!"Range("G53").Value":"Range("H53").Value"
    Last edited by CobraLAD; 11-30-2014 at 08:23 AM.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Chart Axis Label according to 2 cell values

    What is the contents of G53 and H53?
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2024
    Posts
    347

    Re: Chart Axis Label according to 2 cell values

    Both cells will always show an address, in this case
    $F$9 & $BG$9 respectively
    I am using a vba code to put the addresses in that 2 cells

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Chart Axis Label according to 2 cell values

    I would think there would be a way to do this using the INDIRECT function, but couldn't come up with it. Searching the internet, it seems that it's possible, but I couldn't find any results that actually worked, or that provide a clear step-by-step way to set it up. Maybe someone else smarter than me can step in.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Chart Axis Label according to 2 cell values

    Using INDIRECT in the named range causes the chart to report error with formula.
    If you can use a few helper cells to get the row/column position and size then you can use named ranges.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  6. #6
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Chart Axis Label according to 2 cell values

    That does work! But I'm still not seeing how. The chart data range formula points to the data, not to the cells with your INDIRECT formulas. How does it know to adjust the range when you change the start/finish values?

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Chart Axis Label according to 2 cell values

    The chart series references 2 named ranges, as can be seen in the series formula

    =SERIES(,'1051472.xlsx'!LABS,'1051472.xlsx'!DATA,1)

    The named range LABS
    =OFFSET(Sheet1!$A$1,Sheet1!$G$3-1,Sheet1!$H$3-1,Sheet1!$G$4-Sheet1!$G$3+1,Sheet1!$H$4-Sheet1!$H$3+1)

    is the one that locates the start position and range size by using the row/column information from the sheet.

    The named range DATA is simply the range to the immediate right of LABS.
    =OFFSET(LABS,0,1)

    I could not get a named ranged formula that included INDIRECT in the chain to work within the chart.

  8. #8
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Chart Axis Label according to 2 cell values

    I see. You have to look at the individual series values to see the indirect cell references. I was just looking at the Chart Data Range, which shows the full actual range.

    Thanks.

+ 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. [SOLVED] Need to insert Day X-axis label on Chart
    By Dana_Watershed in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-18-2014, 11:11 AM
  2. [SOLVED] Chart Axis Label Not Showing
    By Hudson in forum Excel General
    Replies: 1
    Last Post: 09-27-2012, 10:47 AM
  3. Trying to get VBA to use my Chart Axis Label name range
    By jacob@thepenpoint in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2012, 09:04 AM
  4. Excel 2007 : Chart X Axis label
    By smudgepost in forum Excel General
    Replies: 7
    Last Post: 06-22-2010, 05:02 AM
  5. [SOLVED] Question re: Chart - X Axis Label
    By LavaDude in forum Excel General
    Replies: 2
    Last Post: 02-22-2005, 11:06 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