Return Array Where Values Equal Conditional Statements

mysites

New Member
Joined
Jul 12, 2017
Messages
7
I'm in need of an Excel formula that returns an array (A long array) where each index value is equal to 1 or 0 - the True/False statement of whether each cell in a range of cells is equal to a value in another range of cells.

I have the following range of cells (This range is really 100 cells long, but shortened for explanation purposes)
Member1Member2Member3Member4Member5Member6Member7Member8Member9Member10

<tbody>
</tbody>

I also have the following mapping table which may be out of numerical/alphabetical order at any time:
Member
Group
Member1Group 1
Member2Group 2
Member3Group 1
Member4Group 2
Member5Group 1
Member6Group 2
Member7Group 1
Member8Group 2
Member9Group 1
Member10Group 2

<tbody>
</tbody>


I'd like a formula that will output the following array value {1,0,1,0,1,0,1,0,1,0}(For use inside a formula) when fed the mapping value of "Group 1". The array value should be based on the position of the Members in the horizontal range at the top, not based on the mapping table order.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
=MMULT(--TRANSPOSE(IF(B2:K2=B5:B14,C5:C14="Group 1")),TRANSPOSE(COLUMN(B2:K2)^0))

will return {0;0;0;0;1;0;1;0;0;1} for the example illustrated below:


Excel 2010
ABCDEFGHIJK
1
2Member1Member2Member3Member4Member5Member6Member7Member8Member9Member10
3
4MemberGroup
5Member7Group 1
6Member8Group 2
7Member9Group 2
8Member10Group 1
9Member1Group 2
10Member2Group 2
11Member3Group 2
12Member4Group 2
13Member5Group 1
14Member6Group 2
Sheet1
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

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