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