A formula to return a string of Boolean values

Mr Hughes

New Member
Joined
Apr 27, 2024
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi,

I have created a nice little Filter function based on a table which I am proud of as I'm just getting into the Depths of Excel and loving it. As part of my Filter function I put it inside another to pull specific columns from the table. As such I have a string like so, {1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,0,0,0}.

Is it possible to recreate this string in a formula such that if I add columns to the table the same headers I require will be 1's where as the new column/columns I don't need are 0's?

e.g. {1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,0,0,0} Becomes {1,1,1,0,0,0,1,1,0,"0,0",1,1,0,1,1,0,0,0,0,0} after adding two new columns in the middle of the table. (I put the added 0's in "" so you can identify where I added them, I obviously don't require them in the string.

I'm either on Excel 365/Excel 21 version not 100% sure on which. (Although I believe it's 365.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Put a helper row above the table and input 1's and 0's.
 
Upvote 1
Solution

Forum statistics

Threads
1,216,500
Messages
6,131,015
Members
449,615
Latest member
Nic0la

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