+ Reply to Thread
Results 1 to 2 of 2

Displaying the last 6 values in a row

  1. #1
    Registered User
    Join Date
    06-29-2023
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    1

    Displaying the last 6 values in a row

    Hi Everyone

    I have a table with Dates along the top (Row 1) and in the left column (Column C) I have items which require data to be entered for that timepoint, e.g. Number of missing pages, Number of Missing Visits.

    I would like to display this information as a line graph, but only displaying the last 6 records entered.

    The formula which I am using for Y axis is: (Number of missing pages data)
    =IFERROR(OFFSET(Overview!$D$23,,IF(COUNTA(Overview!$D$23:INDEX(Overview!$23:$23, MATCH(Status_Date, Overview!$1:$1, 0)))<6,0,COUNTA(Overview!$D$23:INDEX(Overview!$23:$23, MATCH(Status_Date, Overview!$1:$1, 0)))-6),,IF(COUNTA(Overview!$D$23:INDEX(Overview!$23:$23, MATCH(Status_Date, Overview!$1:$1, 0)))<6,COUNTA(Overview!$D$23:INDEX(Overview!$23:$23, MATCH(Status_Date, Overview!$1:$1, 0))),6)),"")

    The formula which I am using for X axis is: (Date headers)
    =IFERROR(OFFSET(Overview!$D$1,,IF(COUNTA(Overview!$D$1:INDEX(Overview!$1:$1, MATCH(Status_Date, Overview!$1:$1, 0)))<6,0,COUNTA(Overview!$D$1:INDEX(Overview!$1:$1, MATCH(Status_Date, Overview!$1:$1, 0)))-6),,IF(COUNTA(Overview!$D$1:INDEX(Overview!$1:$1, MATCH(Status_Date, Overview!$1:$1, 0)))<6,COUNTA(Overview!$D$1:INDEX(Overview!$1:$1, MATCH(Status_Date, Overview!$1:$1, 0))),6)),"")

    Overview=Name of worksheet
    Status_Date=this is Cell C2 with a dropdown list of all the dates in Row 1. The user can select any date to see the metrics from that timepoint.

    If the user selects June, then the last 6 months of metrics (e.g. Number of missing pages) will be displayed in the graph to help with trending. If March is selected, then only the last 3 months will display.

    This formula does work and displays up to the last 6 records as expected. I have saved this in the Name Manager function and the graph is referencing this defined name.

    When I delete the dummy data to create a blank template, I am getting an error message "Error found a problem with one or more formula references in the worksheet. Check that the cell references, ranges names, defined names and links to other workbooks in your formulas are all correct."

    I am not sure if my formulae is unstable or why such errors are flagging. Would anyone know what the issue would be?

    Thank you in advance
    Attached Images Attached Images

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Displaying the last 6 values in a row

    X-axis: Please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Y-axis: Please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by HansDouwe; 06-29-2023 at 11:19 AM.

+ 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: 0
    Last Post: 09-29-2016, 08:55 AM
  2. [SOLVED] Displaying multiple values based on several cell values (Sorry about the rubbish title!)
    By Sophie.Durrant in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-15-2015, 12:23 PM
  3. Pivot Chart displaying percentage values as decimal values
    By figo12 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-05-2013, 05:02 PM
  4. Displaying new values
    By Abhinava in forum Excel General
    Replies: 3
    Last Post: 07-07-2011, 11:37 AM
  5. Displaying larger values with smaller values in a Column Chart
    By Max9 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 06-20-2010, 11:59 PM
  6. [SOLVED] finding values and displaying adjacent values
    By willy3211 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2005, 11:49 AM
  7. [SOLVED] Comparing values in two columns and displaying missing values in n
    By cpetta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2005, 11:29 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