+ Reply to Thread
Results 1 to 5 of 5

OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

  1. #1
    Registered User
    Join Date
    08-21-2015
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2016
    Posts
    11

    Red face OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

    Dear Experts,

    I'm new here and have found this forum very interesting.

    I need to present a dynamic chart featuring a dynamic range as I add on new data in specific columns.
    I'm however, unable to do so as my column cells may be empty but is filled with hidden formulas.
    This always makes it count the last set of column cells that I have created (at 500th row) instead of the latest cells reflecting actual numerical values.

    Please advise how to edit my formula and allow the chart to show latest "X" number of cells in a column.



    Formula for Dynamic Chart under Defined Names: =OFFSET($N$18,COUNTA($N:$N)-($X$2+1),0,$X$2,1)

    $N$18 - the column and the cell where my first numerical value will begin.

    COUNTA ($N:$N) - the Column N where all figures will be counted (as per my period value set in another cell named "X2").



    Note:
    1) There is a period setter such that I can choose how many cells in one particular column to reflect on a chart as latest "X" number of information.
    2) My chart formula for OFFSET and COUNTA is under "Defined Names".

    Looking forward to your responses!

    Thanks!

    Teddy

  2. #2
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

    You can use the formula =INDIRECT() to have the range applied within one of your formulas dynamic.

    Ex (if you enter 500 in cell B1 the following formula will count the range N18:N500. As soon as you change the value in B1 to 520 it will be counting N18:N520)
    Please Login or Register  to view this content.
    If that doesn't answer your question you should upload an example worksheet with sample data and desired result entered manually

  3. #3
    Registered User
    Join Date
    08-21-2015
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2016
    Posts
    11

    Wink Re: OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

    Hi ThirdFret,

    Thank you for your response.
    I wanted to attach the file previously but for some reason it couldn't work.

    But it did now (see below).


    Journal.xlsx

    Thanks!

    Teddy

  4. #4
    Registered User
    Join Date
    08-21-2015
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2016
    Posts
    11

    Re: OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

    Hi ThirdFret,

    Tried adjusting the formula with INDIRECT as per your provided code.
    Can't work around it.

    Look forward to help.

    Thanks,

    Teddy

  5. #5
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: OFFSET, COUNTA or SHOULD BE COUNTIF Function for dynamic range for Chart

    Sorry I didn't get to look at your problem over the weekend. Attached is a version of your example sheet that I think does what you're hoping to achieve.

    Charts don't like named ranges using INDIRECT, I guess. The attached solution names the dynamic ranges without using INDIRECT.

    ex.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Creating Dynamic Range Using OFFSET and COUNTA Adds Extra Rows
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2014, 12:44 PM
  2. [SOLVED] Offset with Counta for picture of dynamic table is adding extra row to pic
    By Steve N. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2014, 05:29 PM
  3. Offset and Countif with dynamic Range
    By JKK123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2013, 12:15 AM
  4. Dynamic Chart - Offset function
    By jantonio in forum Excel General
    Replies: 2
    Last Post: 10-17-2011, 02:49 PM
  5. Countif, Count, Offset, Counta and Charts
    By riyo91 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-29-2010, 06:46 AM
  6. Dynamic Range using Offset and CountIF
    By mark_jam3s in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2008, 11:43 AM
  7. Offset, Dynamic range, Countif
    By Bryce in forum Excel General
    Replies: 3
    Last Post: 10-26-2005, 08:05 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