+ Reply to Thread
Results 1 to 4 of 4

Chart min/max based on cell value

  1. #1
    Registered User
    Join Date
    12-22-2011
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2010
    Posts
    58

    Chart min/max based on cell value

    Hi all,

    From another thread I found out how to link a chart's x-axis min/max from cell values when the chart is its own sheet. The code is

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Range("s6:s7"), Target) Is Nothing Then
    With Sheets("Chart")
    With .Axes(xlCategory)
    .MaximumScale = Range("$s$7").Value
    .MinimumScale = Range("$s$6").Value
    End With
    End With
    End If
    End Sub


    Now I need to have that apply to a chart that is an object in a sheet and not it's own sheet. For example, my sheet is named "Main" and that has the data, calcs, and chart all in it.

    I think it's only a matter of going from "Sheets" to something else. Any help would be much appreciated.

    Thanks,
    Mike
    Last edited by Subject_Name_Here; 03-10-2012 at 01:31 PM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Chart min/max based on cell value

    Possibly changing to...
    Please Login or Register  to view this content.

    Also, the moderators tend to give you grief if you don't follow forum rules... for not using code tags.

    HTH,
    Rich

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Chart min/max based on cell value

    You'll need to go one level further:
    Please Login or Register  to view this content.
    for example.
    Good luck.

  4. #4
    Registered User
    Join Date
    12-22-2011
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Chart min/max based on cell value

    Thanks, guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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