+ Reply to Thread
Results 1 to 7 of 7

Use last value in a colum in a chart series

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Use last value in a colum in a chart series

    Hi,
    I have a excel spreadsheet (Excel 2016) which I add to each day with a date in column A and a value in Column B.
    I can determine the last value in the column and place the value into the cell C1 (i.e. $105), I also get the cell reference and put that into cell D1 (i.e. $B:$432)
    I use the columns to make a chart by using the standard series such as Sheet!A1:A130,Sheet1!B1:B130 (date vs value).

    What I want to do is make the chart dynamic so when I add new values to the columns (i.e. add new days etc) the chart automatically updates rather than going into the chart and modifying the series value.
    Is there any way I can use the values in D1 to set the range?

    I have attached an example of what I currently have

    I am fairly new at charting so any help would be appreciated or if someone can point me to a good reference site.
    Regards
    Tonez90
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Use last value in a colum in a chart series

    Right idea

    Create two Dynamic Named Ranges and chart them rather than static ranges.

    dnrA:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    dnrB:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Use last value in a colum in a chart series

    Is this resolved now? Did the updated sample file help to explain how it was done?



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, 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.

  4. #4
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Use last value in a colum in a chart series

    Thanks and it do what is needed.
    Can you point me into a reference that explains creating dynamic named ranges
    Thanks a lot
    Tonez90

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Use last value in a colum in a chart series

    You're welcome. Thanks for the rep.


    This explains a few ways to create a Dynamic Named Range: https://www.ablebits.com/office-addi...c-named-range/

    Would recommend using the INDEX method (as I have) because OFFSET is a volatile function and can affect performance. Personally, I think using INDEX is simpler anyway.

    Note that in this case you can't use COUNTA to determine the last row because there are gaps in column B. I use MATCH to find the last numeric value in column B.

    Also note that whichever column you use to find the last row, use it in all the DNRs. See my example for a comparison.

    If you want more web sites to review the methods, just Google: excel create dynamic named range or better: excel create dynamic named range using index match

    This site explains the INDEX method well: https://exceljet.net/formulas/dynami...nge-with-index

    More importantly, it has links that explain the different ways of determining the last row of data.

  6. #6
    Registered User
    Join Date
    02-11-2014
    Location
    Darwin, Australia
    MS-Off Ver
    Office 365
    Posts
    34

    Re: Use last value in a colum in a chart series

    Thank you,
    The reference you gave are great and helpful.
    I really appreciate you fast help, as I'm still learning like most of us, and as i am sure everyone will agree the help of guru's such as yourself really makes a positive difference.
    regards
    Tonez90

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Use last value in a colum in a chart series

    You're welcome.

+ 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: 1
    Last Post: 02-03-2022, 10:59 AM
  2. Replies: 2
    Last Post: 02-19-2017, 07:52 PM
  3. Delete Pivto Chart Series when certain word/text is found in the Series Name
    By trizzo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2016, 03:19 PM
  4. Formula Help matchin colum a with colum b to display colum c
    By dbe82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2013, 10:11 PM
  5. Chart front-to-back series display if series are different chart types
    By Exconomist in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-06-2012, 06:49 AM
  6. can we combine line chart and colum chart in one chart
    By reedzhou in forum Excel General
    Replies: 1
    Last Post: 06-20-2011, 10:03 PM
  7. If in a series, then add other colum and average
    By benjaminfs733 in forum Excel General
    Replies: 3
    Last Post: 02-03-2009, 04:13 AM

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