How to convert an array of zeros into an arry of true and false?

Luthius

Active Member
Joined
Apr 5, 2011
Messages
324
How to convert an array of zeros into an array of true and false without use IF formula?

FROM
{0;1;0;1;0;1}

TO
{FALSE;TRUE;FALSE;TRUE;FALSE;TRUE}

Ps. The array of false and true, within a formula.
 
Ok. The first step is solved.
Now the problem/challenge is use Boole Algebra to get a result without use IF formula as I said before.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
What were saying is that Excel doesn't work that way. Is there a point to this?
You could write a UDF but that would probably contain Ifs as well.
 
Upvote 0
Ok. The first step is solved.
Now the problem/challenge is use Boole Algebra to get a result without use IF formula as I said before.

I don't think that helps us. You don't want an array of true and false. You want an array of numbers that are not zero and false. This would be the set of values you want to average, with false being ignored by the average formula.
 
Upvote 0
Here's your answer without an IF:

=SUMPRODUCT(--({4,5,6,7,8,9,10}>=2),--({4,5,6,7,8,9,10}<=8),{4,5,6,7,8,9,10})/MAX(1,SUMPRODUCT(--({4,5,6,7,8,9,10}>=2),--({4,5,6,7,8,9,10}<=8)))
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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