Connecting two timelines from two different pivot tables that have different data sources

Vedicine

New Member
Joined
Jan 30, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi

I have created two pivot tables from two different data sources.
These data sources have one thing in common which is that both have column with date.

I want to have one "master" timeline that would control both pivot tables.

I am assuming I would need to create VBA module to control it. I got myself that far (code below), but it doesn't work. I get no error, but whenever I change date range on timeline "Data", which is supposed to be a this "Master" timeline, the date range on timeline "Data1" doesn't change.

VBA Code:
Sub UpdateTimelineDate()
    Dim selectedRange As Range
    ' Get the selected date range on timeline "Data"
    Set selectedRange = ActiveWorkbook.TimelineViews("Data").Range
    ' Apply the selected date range to timeline "Data1"
    ActiveWorkbook.TimelineViews("Data1").RangeStart = selectedRange.Start
    ActiveWorkbook.TimelineViews("Data1").RangeEnd = selectedRange.End
End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

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