filter function turns error if i add column in between the array

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
295
Office Version
  1. 365
Platform
  1. Windows
I have this formula =FILTER($A$2:$F$11,{1,0,0,0,1}), its working fine. However, if I insert another column in between the array it turns to error (#VALUE!)..
Is there in any way to avoid the error?.. thank you





NameEmp.#DateDept.AmtRESULT
Name1100111-05-22A1000Nameamt
Name2100211-06-22B1000
#VALUE!​
Name3100311-07-22C1000
Name4100411-08-22A1000
Name5100511-09-22B1000
Name6100611-10-22C1000
Name7100711-11-22A1000
Name8100811-12-22B1000
Name9100913-11-22C1000
Name10101014-11-22A1000
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Do you have the CHOOSECOLS function?
 
Upvote 0
Assuming you always want the first and last columns:

Excel Formula:
=CHOOSECOLS($A$2:$F$11,1,columns($A$2:$F$2))
 
Upvote 0
Solution
Glad we could help. :)
 
Upvote 0
FWIW you could also use
Excel Formula:
=CHOOSECOLS($A$2:$F$11,1,-1)
 
Upvote 0

Forum statistics

Threads
1,215,781
Messages
6,126,863
Members
449,345
Latest member
CharlieDP

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