Pivot creation for dynamic range of table and filter

Hello,

I have checked all the pages of creating pivot , but all showed we have to hard code the range while creating a table or using vbcode.
Can any one please help me out how to mention range for large and dynamic data and give filter in pivot as no one gave how to apply filter in pivot table.

Please find attached sample data.
Thanks,
PadminiSample.xlsx (1.4 MB)

Hi @chandrashekar_padmin

Check this

Pivot Table Creation

Thanks
Ashwin.S

Hello @AshwinS2,

Thanks for referring , but there also the same question was asked how to make the range dynamic , but it was not answered.
And i wanted to give filter in pivot table pls help me with that as well?

Hi @chandrashekar_padmin

Set the range as “”

Thanks
Ashwin.S

Hello @AshwinS2,

Thank you , can u pls tell me what will be code to get the filter for pivot?
like u can the image of what i am asking.

Hi @chandrashekar_padmin

Check this post
https://www.thespreadsheetguru.com/blog/2014/9/27/vba-guide-excel-pivot-tables

Use invoke code activity

Thanks
Ashwin.S

u can use variables in the vba code by passing parameters

Hello @AshwinS2,
I have written the code as you gave , but it is not inserting the pivot when i run the xaml.
can you pls check this one , if i missed something?
Main (2) (1) (5).xaml (14.8 KB)

Hi @chandrashekar_padmin

Or use hot key operations based on Excel application scope

Thanks
Ashwin.S

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.