Filter a Field in Power Query Using VBA

Richynero

Board Regular
Joined
Jan 16, 2012
Messages
150
Hi there,

I have a large Power Query model which is made up of 5 sectors. The business want to split these into 5 workbooks for privacy reasons. Id like to run a macro that would filter the field 'sector' in power query by looping through the 5 sectors and then saving a sector version file. Question is.. how can I filter a field in Power Query using VBA?

I have searched the internet far and wide to an answer to this but to no avail so any help would be great. Im comfortable with loops so just need the code to write to the filter in Power Query.

Thank you in advance for your support!

Richard
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,803
Messages
6,174,689
Members
452,577
Latest member
Filipzgela

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