Select all columns from the 3rd column - Power Query

daniel95

New Member
Joined
Jul 13, 2016
Messages
14
Hi,

I'm trying to select all columns from the 3rd column in Power Query such that whenever there's a new column added it is selected in the query as well.

In Macro a quick way to do this was to record "Cntrl + Shift + ➡️" from the third column.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi,
Maybe this way?
Power Query:
Table.SelectColumns(Table, List.Range(Table.ColumnNames(Table),3))
 
Upvote 0
Hi,
Maybe this way?
Power Query:
Table.SelectColumns(Table, List.Range(Table.ColumnNames(Table),3))
Hi, Thanks for your prompt reply.

On trying that, there was an error that came up. attached screenshot below.

1609821499291.png
 
Upvote 0
Hi, Thanks for your prompt reply.

On trying that, there was an error that came up. attached screenshot below.

View attachment 29082
In this case the code should be
Power Query:
, SelectCols = Table.SelectColumns(#"Filtered Rows", List.Range(Table.ColumnNames(#"Filtered Rows"), 3 ) )
in
SelectCols

PS: for future posts, don't post images but paste the code inside the code tages via the code features of the forum (M = Power Query language)
1609836446557.png
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,750
Messages
6,174,291
Members
452,554
Latest member
Louis1225

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