Return Timeline Selection

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,645
Office Version
  1. 365
Platform
  1. Windows
Is it possible to either return the Label Selection or the periods selected from a Timeline attached to a pivot table?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Yes.

Code:
Sub Marine()
'
Dim t As TimelineState


Set t = ActiveWorkbook.SlicerCaches("NativeTimeline_date1").TimelineState
MsgBox t.StartDate & vbLf & t.EndDate
End Sub
 
Upvote 0
Thanks for this but is it possible to do this via a formula?
 
Upvote 0
You could use a UDF. If no VBA is allowed, I can try a different approach.

Excel Workbook
GH
4301/01/201531/03/2015
Plan16

Code:
Function MM()
Dim v(), t As TimelineState
ReDim v(1 To 2)
Set t = ActiveWorkbook.SlicerCaches("NativeTimeline_date1").TimelineState
v(1) = t.StartDate
v(2) = t.EndDate
MM = v
End Function
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,126
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