Forum Discussion

rommel_a_martinez's avatar
rommel_a_martinez
Copper Contributor
Jul 16, 2024

How will i add another value (e.g. TLOG_MMF_COR_0003) in the below

Hi,

 

How will i add another value (e.g. TLOG_MMF_COR_0003) in the below 'Type:=xlCaptionDoesNotBeginWith' where existing
value1 'ATLOG_MMF_0003' is there already:

=======================================================

ActiveSheet.PivotTables("PivotTable9").PivotFields("USSMG_File-list"). _
PivotFilters.Add2 Type:=xlCaptionDoesNotBeginWith, Value1:="ATLOG_MMF_0003"

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    rommel_a_martinez 

    Excel does not support directly adding multiple xlCaptionDoesNotBeginWith conditions in a single filter command, so far I know.

    However, maybe you can achieve the desired functionality by applying two separate filters on the same pivot field. But if you need to exclude many values, you may need to consider an alternative approach, e.g. For example, you can create a custom list of exclusions and apply them programmatically using loops or advanced filtering techniques.

     

    How and what exactly you could use depends on your plans, my knowledge of Pivot filter is limited, there are some here in forum that could help you much better...if you explain your plan briefly and step by step and provide some information at the same time Specify your digital environment (like Excel version, operating system, storage medium, etc.).

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

Resources