+ Reply to Thread
Results 1 to 1 of 1

Create macro that sorts pivot like value filters - between

  1. #1
    Registered User
    Join Date
    11-23-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    1

    Create macro that sorts pivot like value filters - between

    I want filter revenue between two numbers for a large amount of customer.
    I can record a macro that looks like this

    Sub SegmentD()
    '
    ' SegmentD Macro
    ' Segment D udvælges
    '

    '
    Range("B25").Select
    ActiveSheet.PivotTables("PivotTable2").PivotFields("Kundenummer").PivotFilters. _
    Add Type:=xlValueIsBetween, DataField:=ActiveSheet.PivotTables( _
    "PivotTable2").PivotFields("Sum of Omsætning 2012"), Value1:=0, Value2:= _
    2917
    Application.Goto Reference:="SegmentD"
    End Sub

    What I would like to is that Value1 and Value2 refers to two cells representing the two values, instead of beeing fixed numbers.
    The cells in this case are in O14 and P14

    How do I do that
    Last edited by Kjeldsen; 11-23-2012 at 08:12 AM. Reason: macro, pivot, sort, between

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1