Q:

Use VBA to make pivot table sum values based on dates only?

I have an excel with 2 sheets. on sheet 1 we have a pivottable1 that shows each "account" and the sum of ALL transactions in each account. in sheet 2 I have the data referenced in the pivottable1 with the columns (date,account,value). I want to create a script where given an input date from the user the script will run and make the pivottable1 sum the values up to the given date. 
is this possible to do outside of vba? if not what should I search to get started on a project like that?

A:

I am afraid the only way is VBA in this case as the pivot table filter doesn t allow you to select a cell. 
When you are starting with VBA, recording a macro is usually the way to start. In your case you could record changing the filter in your pivot table and adjust the filter to the date input you need:
The issue here is that VBA add some empty strings when you enter a date in a filter, so I had to trick to take them out. 
The code below start with an input box, ask for a date that the user can enter. Then this date will be changed into a nice string for VBA to use in the filter. 
Sub Macro2()

Dim a As Date
Dim Dayd, Monthd, Yeard As String

' a = Range("A1").Value          You can use this instead of the input box below
a = InputBox("Date here")

' Day The lines below find the date in the format "01" - "31" 
If Left(Mid(Str(Day(a)), 2, 2), 1) <> 1 And Left(Mid(Str(Day(a)), 2, 2), 1) <> 2 And Left(Mid(Str(Day(a)), 2, 2), 1) <> 3 Then
    Dayd = "0" & Right(Str(Day(a)), 1)
Else
    Dayd = Right(Str(Day(a)), 2)
End If

' Month  These lines find the months in the same way
If Left(Mid(Str(Month(a)), 2, 2), 1) <> 1 Then
    Monthd = "0" & Right(Str(Month(a)), 1)
Else
    Monthd = Right(Str(Month(a)), 2)
End If

' Year
Yeard = Right(Str(Year(a)), 4)

'This is testing if the date is in the format I want ex:"15.08.2018" (dd.mm.yyy)

MsgBox (Dayd & "." & Monthd & "." & Yeard)

'Below the code from the "Record Macro" 
    ActiveSheet.PivotTables("PivotTable2").PivotFields("SODATE").ClearAllFilters
    ActiveSheet.PivotTables("PivotTable2").PivotFields("SODATE").PivotFilters.Add2 _
        Type:=xlCaptionIsLessThan, Value1:=Dayd & "." & Monthd & "." & Yeard
End Sub

I tried to add notes, please say if you need more explanations

