Creating dynamic chart showing last 90 calendar days entries

Ironman

Well-known Member
Joined
Jan 31, 2004
Messages
1,069
Office Version
  1. 365
Platform
  1. Windows
Hello

I have literally rubbed my eyebrows away trying desperately to create a dynamic line chart with columns A, G and H from the below data, so the chart shows only the most recent 90 calendar days entries (NOT the last 90 entries - please let me know if it's necessary to insert a daily entry with a zero value for this to work as I would like).

I've looked in the forum and on the net and I just don't understand if I am able to do this directly from this data or if I have to convert the below to a table with just 3 columns and work from that. However, if I create a separate table I cannot understand how the data would copy from the data sheet below to the table.

After many very late hours trying to work it out it myself I've been on the verge of just giving up and I would be so grateful for a solution that will make this work as it's my exercise bike fitness tracker!

Thank you so much!


Book1
ABCDEFGH
10DATETIME (h:mm)DIST. (km)DIST. (mls)SPEED (mph)LEVELHR BPMPower (W)
11Sat, 6 Jan 20180:3315.29.417.2
12Wed, 10 Jan 20180:4321.213.218.4
13Tue, 16 Jan 20180:4821.213.216.5
14Fri, 19 Jan 20180:5222.213.815.9
15Tue, 23 Jan 20180:5326.316.318.5>100
16Thu, 25 Jan 20180:4621.313.217.3
17Sat, 27 Jan 20180:4520.012.416.6
18Sun, 28 Jan 20180:4620.712.916.8
19Wed, 31 Jan 20180:5023.614.717.6122
20Wed, 14 Feb 20180:4521.013.017.4
21Thu, 22 Feb 20180:4520.913.017.3<120
22Sun, 4 Mar 20180:4521.013.017.4<110
23Tue, 6 Mar 20180:4822.013.717.1111
24Sat, 10 Mar 20180:4720.812.916.5
25Sat, 17 Mar 20181:0125.816.015.8110
26Thu, 12 Apr 20180:4519.312.016.0110
27Mon, 23 Jul 20180:3011.87.314.411090
28Sat, 11 Aug 20180:3013.48.316.6120
29Tue, 25 Sep 20180:3012.47.715.45 (42%)108100
30Wed, 26 Sep 20180:4014.69.113.65 (42%)10795
31Wed, 3 Oct 20180:3012.07.514.95 (42%)113100
32Mon, 8 Oct 20180:3010.96.813.55 (42%)10391
33Sun, 14 Oct 20180:4015.29.414.25 (42%)10795
34Thu, 18 Oct 20180:3512.87.913.65 (42%)12091
35Sun, 21 Oct 20181:0023.214.414.45 (42%)11897
36Wed, 24 Oct 20180:3512.27.613.05 (42%)9587
37Sat, 27 Oct 20180:4518.011.214.95 (42%)10499
38Tue, 30 Oct 20181:0024.515.215.25 (42%)111102
39Fri, 2 Nov 20181:0024.115.015.05 (42%)106100
40Mon, 5 Nov 20181:0024.815.415.45 (42%)105103
41Wed, 7 Nov 20180:4519.111.915.85 (42%)105106
42Fri, 9 Nov 20181:0025.215.615.65 (42%)115102
43Sun, 11 Nov 20181:0026.916.716.75 (42%)111112
44Wed, 14 Nov 20181:0026.416.416.45 (42%)110111
45Mon, 19 Nov 20180:4518.711.615.55 (42%)103104
46Wed, 21 Nov 20181:0026.216.316.35 (42%)108109
47Fri, 23 Nov 20181:0022.814.214.26 (50%)105117
48Sun, 25 Nov 20181:0023.114.314.36 (50%)108118
49Wed, 28 Nov 20181:0223.914.814.46 (50%)105118
50Sat, 1 Dec 20181:0023.614.714.76 (50%)107121
51Tue, 4 Dec 20181:0023.814.814.86 (50%)109122
52Thu, 6 Dec 20181:0022.714.114.16 (50%)110117
53Sat, 8 Dec 20181:0023.414.514.56 (50%)107121
54Mon, 10 Dec 20181:0025.615.915.96 (50%)131131
55Wed, 12 Dec 20181:0024.215.015.06 (50%)110124
56Fri, 14 Dec 20181:0023.314.514.56 (50%)104120
57Mon, 17 Dec 20181:0025.315.715.76 (50%)108130
58Wed, 19 Dec 20181:0024.415.215.26 (50%)108125
59Fri, 21 Dec 20181:0021.513.413.46 (50%)90110
60Sun, 23 Dec 20181:0024.014.914.96 (50%)99123
61Wed, 26 Dec 20181:0023.714.714.76 (50%)94122
62Fri, 28 Dec 20181:0024.915.515.56 (50%)102128
63Sun, 30 Dec 20181:0023.114.314.36 (50%)97119
64Wed, 2 Jan 20191:0021.313.213.26 (50%)90109
65Fri, 4 Jan 20191:0023.614.714.76 (50%)95121
66Sun, 6 Jan 20191:0024.915.515.56 (50%)109128
67Tue, 8 Jan 20191:0023.014.314.36 (50%)89119
68Thu, 10 Jan 20191:0026.716.616.66 (50%)110137
69Sat, 12 Jan 20191:0023.514.614.66 (50%)92121
70Mon, 14 Jan 20191:0025.015.515.56 (50%)101128
Exercise Bike
 
Last edited:
Re: Help with creating dynamic chart showing last 90 calendar days entries please?

Excellent good to hear. Its better if pivot tables have there own sheet anyway.

I was looking for a formula to create dynamic named ranges for your date/hr/power columns so that you wouldn't need to update your array formulas.

If I find it I'll update the last file.
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Re: Help with creating dynamic chart showing last 90 calendar days entries please?

Hi Rasghul - I'm not sure it's necessary for you to go to that trouble (unless it makes it more efficient?) because everything updates automatically now.

Edit - I've just checked the chart again and it doesn't remove the earliest entry!
 
Last edited:
Upvote 0
Re: Help with creating dynamic chart showing last 90 calendar days entries please?

Hi Rasghul - In case you didn't read my edited reply, I've just checked the chart again and it doesn't remove the earliest entry so I guess it's not dynamic any more?
 
Upvote 0
Re: Help with creating dynamic chart showing last 90 calendar days entries please?

Correct as the table looked after that
 
Upvote 0
Re: Help with creating dynamic chart showing last 90 calendar days entries please?

I was looking for a formula to create dynamic named ranges for your date/hr/power columns so that you wouldn't need to update your array formulas.

If I find it I'll update the last file.

Hi Rasghul - if you have a look at the Last90R Data sheet that refers to the dynamic Last 90 Runs chart there are Offset formulas and named ranges in there that I didn't create that might help you...
 
Last edited:
Upvote 0
Hi Rasghul, thanks for doing that.

Unfortunately although the formula updates instantly, the earliest entry still doesn't drop out of the table/chart.

The code
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ThisWorkbook.RefreshAll
End Sub
was already in the Exercise Bike sheet so I didn't need to add it.

I also clicked Refresh All and it made no difference.
 
Last edited:
Upvote 0
The formula is calculating correctly;

Criteria Today() - 90 = 25-10-18
There are still 37 Dates from 25-10-18 to today that meet the criteria
It wasn't until I reduced the days criteria to 87 (28-10-18) and refresh did the oldest date change.

The oldest date won't change until Friday 26th Jan.
 
Last edited:
Upvote 0
Agh! Apologies for that - it's what happens when I get 2 hours' sleep :-(

Many thanks once again for all your help and persistence RasGhul.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top